better support of PACKAGE_DST environment variable

This commit is contained in:
Emmanuel Garette 2020-08-12 11:55:55 +02:00
parent 659243ba8f
commit 50d42624cc
1 changed files with 10 additions and 3 deletions

View File

@ -1,11 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from setuptools import setup, find_packages from setuptools import setup
import os import os
from tiramisu import __version__ from tiramisu import __version__
PACKAGE_NAME = os.environ.get('PACKAGE_DST', 'tiramisu') ORI_PACKAGE_NAME = 'tiramisu'
PACKAGE_NAME = os.environ.get('PACKAGE_DST', ORI_PACKAGE_NAME)
if PACKAGE_NAME != ORI_PACKAGE_NAME:
package_dir = {PACKAGE_NAME: ORI_PACKAGE_NAME}
else:
package_dir = None
setup( setup(
version=__version__, version=__version__,
@ -40,5 +46,6 @@ producing flexible and fast options access.
This version requires Python 3.5 or later. This version requires Python 3.5 or later.
""", """,
include_package_data=True, include_package_data=True,
packages=find_packages(include=['tiramisu']) package_dir=package_dir,
packages=[PACKAGE_NAME],
) )