What's the function of MANIFEST.in
?
I found a MANIFEST.in file in a project, and in it there is content:
recursive-include *.py
include README.rst
include LICENSE
what's the function of it?
Just to add to the other answers: MANIFEST.in
allows you to control which files are included in your package.
By default, when you actually package up your python code (using, say python setup.py sdist
) to create a zipped archive for distribution, the packager will only include in the package archive a certain set of files (the python code itself, for example). What if you have a text file (say, a template) or a figure (for your documentation) included in your repository? By default, the packager will not include those files in the archive, and it will be incomplete.
MANIFEST.in
allows you to override the default, specifying exactly what files you need included in your zip archive for distribution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With