Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I keep the MANIFEST file that setup.py generates under version control?

Tags:

python

pypi

When I'm maintaining and distributing a Python package, should I keep the MANIFEST file that the command

python setup.py sdist

generates under version control, or should I add it to .gitignore?

like image 468
Ben Hamner Avatar asked Jun 19 '12 23:06

Ben Hamner


1 Answers

The file is generated with some commonly used ideas of what files to include in the source distribution. If it's not there, it can easily be regenerated. Typically, if you want to make changes (for example, adding a file that the generation doesn't by default cover), you actually make changes to the MANIFEST.in file. The Manifest.in file you SHOULD have version controlled.

Of course, in some cases you might want to create the MANIFEST file yourself and not rely on the auto-generation at all. In those cases, you would want to version control the manifest file.

I have not encountered any need to version control it, but you might want to leave the question open for other comments, as I also don't have much experience with more elaborate package building.

like image 86
Mark Hildreth Avatar answered Oct 03 '22 19:10

Mark Hildreth