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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.