-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide --egg option to opt out --single-version-externally-managed #541
Conversation
The Travis CI failure is an unrelated intermittent failing test, ignore that, tests pass on this. Re making this option work via config or env var, good news -- you don't have to do anything, it already works. All pip options automatically work as either env vars (in this case, set I do notice though that there's error output later in the install method because pip can't find where to put its installed-files record. I think we should still include the installed-files record and place it at the top-level inside the unzipped egg. This also means we should use the Other than those fixes, this looks ready for merge! Good work, thanks! |
I can't find a clean way to get the egg dir from list of files in diff --git a/pip/req.py b/pip/req.py index 0e50672..c86030e 100644 --- a/pip/req.py +++ b/pip/req.py @@ -595,6 +595,9 @@ exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), _ if line.endswith('.egg-info'): egg_info_dir = line break + if line.endswith('EGG-INFO/PKG-INFO'): + egg_info_dir = line[:-len('EGG-INFO/PKG-INFO')] + break else: logger.warn('Could not find .egg-info directory in install record ## FIXME: put the record somewhere But since pip now can properly uninstall packages installed by easy_install, do we really need to keep |
I'm not totally opposed to just leaving out I think finding it should be just as easy as the current code to find the egg-info dir; directories are included too, so we can just look for a |
There's no .egg dir in record_filename. Here's list of files that I get when iterating record_filename while installing argparse module:- /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/argparse.py /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/argparse.pyc /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/EGG-INFO/PKG-INFO /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/EGG-INFO/not-zip-safe /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/EGG-INFO/dependency_links.txt /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/EGG-INFO/SOURCES.txt /home/kamal/python/env/pip/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg/EGG-INFO/top_level.txt Also I found out that there's no http://python.6.n6.nabble.com/setuptools-zip-safe-as-command-line-option-td2003942.html I've try the workaround |
Meh, that's unfortunate that there's no |
Sorry, the commit message a bit wrong. Should be "do not write installed-files.txt if using install --egg". |
Provide --egg option to opt out of --single-version-externally-managed
Discussion here - #3 (comment)