Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the function of `MANIFEST.in`?

Tags:

python

What's the function of MANIFEST.in?

enter image description here

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?

like image 946
user7693832 Avatar asked Oct 21 '25 05:10

user7693832


1 Answers

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.

like image 181
nsheff Avatar answered Oct 22 '25 18:10

nsheff