Given the following (demonstration) project layout:
MyProject/
README
LICENSE
setup.py
myproject/
... # packages
extrastuff/
... # some extra data
How (and where) do I declare different distribution types? Especially I need these two options:
-
A distribution containing only the source
-
A distribution containing the source and all data files under (extrastuff)
Ideally, how do I declare the upper two configuration whereas the second one depends on the first one?
I’ve implemented something like this before … the
sdistcommand can be extended to handle additional command line arguments and to manipulate the data files based on these. If you runpython setup.py sdist --help, it’ll include your custom command line arguments in the help, which is nice. Use the following recipe: