Re: "Do I need MANIFEST.in?
No, you do not need to use MANIFEST.in . Both distutils and setuptools are included in the distribution source with all the files mentioned in setup.py - modules, python, README.txt and test/test*.py batch files. If this is all you want in the distribution, you do not need to use MANIFEST.in .
If you want to manipulate (add or delete) the default files to include, you must use MANIFEST.in .
Re: What should be in it?
The procedure is simple:
Make sure that in setup.py you include (using the setup arguments) all the files that you consider important for running the program (modules, packages, scripts ...)
Check if there are some files to add or some files to exclude. If none of them are needed, then there is no need to use MANIFEST.in .
If MANIFEST.in is required, create it. You usually add tests*/*.py README.rst files, README.rst if you are not using the README.txt , docs files, and possibly some data files for the test suite, if necessary.
For example:
include README.rst include COPYING.txt
To test it, run python setup.py sdist and examine the archive created in dist/ .
When all these different package systems ...
Comparing the situation today and 2 years ago - the situation is much better - setuptools is the way to go. You can ignore the fact that distutils bit broken and is a low level base for setuptools , as setuptools to take care to hide these things from you.
EDIT . The last few projects I use pbr to create distribution packages with three lines of setup.py and the rest are in setup.cfg and requirements.txt . No need to worry about MANIFEST.in and other strange things. Despite the fact that the package deserves more detailed documentation. See http://docs.openstack.org/developer/pbr/
Jan Vlcinsky Jul 13 '14 at 23:28 2014-07-13 23:28
source share