can change package name
This commit is contained in:
parent
9f36e679a1
commit
ebf84b5a69
5
Makefile
5
Makefile
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/make
|
||||
|
||||
PACKAGE := tiramisu
|
||||
ifeq ($(PACKAGE_DST),)
|
||||
PACKAGE_DST := $(PACKAGE)
|
||||
endif
|
||||
|
||||
INSTALL := install
|
||||
INSTALL_DATA := install -m 644
|
||||
|
@ -43,7 +46,7 @@ define install_translation
|
|||
for file in `find ${1} -name "*.mo"`; do \
|
||||
$(INSTALL_DIR) $(TRADUC_DEST)/`echo $$file | cut -d '/' -f 2` || true; \
|
||||
$(INSTALL_DIR) $(TRADUC_DEST)/`echo $$file | cut -d '/' -f 2`/LC_MESSAGES || true; \
|
||||
$(INSTALL_DATA) $$file $(TRADUC_DEST)/`echo $$file | cut -d '/' -f 2`/LC_MESSAGES || true; \
|
||||
$(INSTALL_DATA) $$file $(TRADUC_DEST)/`echo $$file | cut -d '/' -f 2`/LC_MESSAGES/$(PACKAGE_DST).mo || true; \
|
||||
done; \
|
||||
fi
|
||||
endef
|
||||
|
|
18
setup.py
18
setup.py
|
@ -3,6 +3,10 @@
|
|||
from distutils.core import setup
|
||||
from os.path import dirname, abspath, join, normpath, isdir
|
||||
from os import listdir
|
||||
import os
|
||||
|
||||
|
||||
package_name = os.environ.get('PACKAGE_DST', 'tiramisu')
|
||||
|
||||
|
||||
def fetch_version():
|
||||
|
@ -18,18 +22,23 @@ def return_files(component):
|
|||
paths = filter(isdir, [join(path, content)
|
||||
for content in dir_content])
|
||||
lst = ['.'.join(path.split('/')[-3:]) for path in paths]
|
||||
lst = [package_name + '.' + '.'.join(path.split('/')[-2:]) for path in paths]
|
||||
return lst
|
||||
|
||||
|
||||
packages = ['tiramisu', 'tiramisu.storage', 'tiramisu.option']
|
||||
packages = [package_name, package_name + '.storage', package_name + '.option']
|
||||
packages.extend(return_files('storage'))
|
||||
packages.extend(return_files('option'))
|
||||
print packages
|
||||
|
||||
if package_name != 'tiramisu':
|
||||
package_dir = {package_name: 'tiramisu'}
|
||||
else:
|
||||
package_dir = {}
|
||||
|
||||
setup(
|
||||
author="Tiramisu's team",
|
||||
author_email='contact@cadoles.com',
|
||||
name='tiramisu',
|
||||
name=package_name,
|
||||
version=fetch_version(),
|
||||
description='an options controller tool',
|
||||
url='http://tiramisu.labs.libre-entreprise.org/',
|
||||
|
@ -61,5 +70,6 @@ producing flexible and fast options access.
|
|||
|
||||
This version requires Python 2.6 or later.
|
||||
""",
|
||||
packages=packages
|
||||
packages=packages,
|
||||
package_dir=package_dir
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue