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?
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.
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