Do I need to commit the dist folder to git in order to be able to install the package using pip from git? Do I need to commit the dist folder to git in order to be able to install the package using pip from git? python-3.x python-3.x

Do I need to commit the dist folder to git in order to be able to install the package using pip from git?


You do not need to commit the dist folder. pip really just needs the repository to have a setup.py file along with the packages and/or modules you're installing.


dist is a default name for a directory that contains the final build result: your project ready to be distributed, that is, packaged into a file which pip or other package managers know how to install:

$ python setup.py sdist --help...  --dist-dir (-d)   directory to put the source distribution archive(s) in                    [default: dist]

So it is safe to ignore the directory and all of its contents in .gitignore. If you do not plan to upload you project's installation files to PyPI and intend to install it via passing Git url, you don't even need the dist directory and can safely delete it. It will be recreated anyway once you issue any dist command (sdist, bdist, bdist_wheel, bdist_rpm etc).