import os from setuptools import find_packages, setup # Declare your non-python data files: # Files underneath configuration/ will be copied into the build preserving the # subdirectory structure if they exist. data_files = [] for root, dirs, files in os.walk("configuration"): data_files.append( (os.path.relpath(root, "configuration"), [os.path.join(root, f) for f in files]) ) setup( name="datamask_pyutil", version="0.0.1", # declare your packages packages=find_packages(where="src", exclude=("test",)), package_dir={"": "src"}, # include data files data_files=data_files, # declare your scripts # If you want to create any Python executables in bin/, define them here. # This is a three-step process: # # 1. Create the function you want to run on the CLI in src/datamask-pyutil/cli.py # For convenience I usually recommend calling it main() # # 2. Uncomment this section of the setup.py arguments; this will create # bin/datamask-pyutil (which you can obviously change!) as a script # that will call your main() function, above. # # entry_points="""\ # [console_scripts] # datamask-pyutil = datamask-pyutil.cli:main # """, # # 3. Uncomment the Python interpreter and Python-setuptools in the # dependencies section of your Config. This is necessary to guarantee the # presence of a runtime interpreter and for the script generated by # setuptools to find its function. # # Control whether to install scripts to $ENVROOT/bin. The valid values are: # * "default-only": install scripts for the version corresponding to # Python-default in your version set. If this package doesn't build for # that version, you won't get root scripts. # * True: always install scripts for some version of python that the package # builds for (in practice, this will be the last version that is built). # Note that in this case, you also need to ensure that the appropriate # runtime interpreter is in the dependency closure of your environment. # * : only # attempt to install root scripts for the specific interpreter version. If # this package is in a version set where that interpreter is not enabled, # you won't get root scripts. You almost certainly don't want this. )