Do you keep the foo.egg_info
directory in version control?
Here an example where it would be nice to have it in VC:
pip install -e foo
foo.egg-info/entry_points.txt
)setup.py
againIf all that was updated in the package was the addition of an entry point, that'd be an irresponsible release; if any feature changes in a package, you need to update the version number. How else will you know that you have the right feature set installed?
If you are using eggs from a VCS, then pip already takes care of updating the egg info for you. Just run pip install -e foo
again; it'll update the package and re-generate the egg info for you:
$ bin/pip install -e git+https://github.com/mjpieters/setuptools_subversion.git#egg=setuptools_subversion
Obtaining setuptools-subversion from git+https://github.com/mjpieters/setuptools_subversion.git#egg=setuptools_subversion
Cloning https://github.com/mjpieters/setuptools_subversion.git to /tmp/pip-e/src/setuptools-subversion
Running setup.py egg_info for package setuptools-subversion
Installing collected packages: setuptools-subversion
Running setup.py develop for setuptools-subversion
Creating /private/tmp/pip-e/lib/python2.7/site-packages/setuptools-subversion.egg-link (link to .)
Adding setuptools-subversion 3.2 to easy-install.pth file
Installed /private/tmp/pip-e/src/setuptools-subversion
Successfully installed setuptools-subversion
Cleaning up...
$ bin/pip install -e git+https://github.com/mjpieters/setuptools_subversion.git#egg=setuptools_subversion
Obtaining setuptools-subversion from git+https://github.com/mjpieters/setuptools_subversion.git#egg=setuptools_subversion
Updating /tmp/pip-e/src/setuptools-subversion clone
Running setup.py egg_info for package setuptools-subversion
Installing collected packages: setuptools-subversion
Running setup.py develop for setuptools-subversion
Creating /private/tmp/pip-e/lib/python2.7/site-packages/setuptools-subversion.egg-link (link to .)
setuptools-subversion 3.2 is already the active version in easy-install.pth
Installed /private/tmp/pip-e/src/setuptools-subversion
Successfully installed setuptools-subversion
Cleaning up...
Note the second invokation; instead of 'cloning', the second run states pip
is 'updating' the VCS clone, after which setup.py egg_info
is run again.
The egg info metadata is entirely generated from source; only commit the source to the VCS and leave the egg info out of it entirely. That way you can still generate platform-specific dependencies as well, for example.
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