77"""
88
99# Always prefer setuptools over distutils
10+ # from setuptools import setup, find_packages, find_namespace_packages
1011from setuptools import setup , find_packages
1112import os
1213import sys
@@ -26,9 +27,10 @@ def read_text(file_name):
2627 return content
2728
2829
29- PROJECT_PREFIX = '/Users/dovsnier/Documents/Work_Space_Python/Python-DeMo/'
30- project = PROJECT_PREFIX
31- # print(project)
30+ project = os .getenv ('BASE_PROJECT_PREFIX' )
31+ if project is None :
32+ raise KeyError ('the please configure BASE_PROJECT_PREFIX environment variable, otherwise it cannot run' )
33+ print (project )
3234PROJECT_DIRECTORY = 'process' # project directory
3335PROJECT_README_FILE = 'README.md' # project readme file
3436README_ROOT_DIRECTORY = os .path .join (project , 'doc/description' )
@@ -104,14 +106,10 @@ def read_text(file_name):
104106# DVSNIER_PY_MODULES = ["xxx"] # Required
105107# DVSNIER_PACKAGES = find_packages(include=['xxx', 'xxx.*']) # Required
106108DVSNIER_PACKAGES = find_packages (where = 'src' ) # Required
109+ # DVSNIER_NAMESPACE_PACKAGES = find_namespace_packages(include=['com.*']) # Required
107110# DVSNIER_PYTHON_REQUIRES = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*'
108111DVSNIER_PYTHON_REQUIRES = '>=2.7, <4'
109112DVSNIER_INSTALL_REQUIRES = [ # Optional
110- # 'discover==0.4.0',
111- # 'build==0.4.0',
112- # 'pathlib2==2.3.5',
113- # 'toml==0.10.2',
114- # 'twine==1.15.0',
115113]
116114DVSNIER_EXTRAS_REQUIRE = { # Optional
117115 'dev' : ['check-manifest' ],
@@ -241,6 +239,11 @@ def read_text(file_name):
241239 #
242240 packages = DVSNIER_PACKAGES , # Required
243241
242+ #
243+ # Only for Python 3.x and above
244+ #
245+ # namespace_packages=DVSNIER_NAMESPACE_PACKAGES, # Optional
246+
244247 # If your project contains any single-file Python modules that aren’t part of
245248 # a package, set py_modules to a list of the names of the modules (minus the .py
246249 # extension) in order to make setuptools aware of them.
@@ -292,6 +295,14 @@ def read_text(file_name):
292295 # executes the function `main` from this package when invoked:
293296 entry_points = DVSNIER_ENTRY_POINTS , # Optional
294297
298+ #
299+ # 1. https://www.python.org/dev/peps/pep-0328/
300+ # 2. https://setuptools.readthedocs.io/en/latest/userguide/package_discovery.html
301+ # 3. https://packaging.python.org/guides/packaging-namespace-packages/
302+ # 4. https://github.com/pypa/sample-namespace-packages/tree/master/pkgutil
303+ #
304+ zip_safe = False ,
305+
295306 # List additional URLs that are relevant to your project as a dict.
296307 #
297308 # This field corresponds to the "Project-URL" metadata fields:
0 commit comments