pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.52k stars 3.03k forks source link

Make debundling easier by falling back to global installs #1678

Closed dstufft closed 9 years ago

dstufft commented 10 years ago

Right now for OSs to debundle stuff from pip they have to rm -rf the _vendor directory and then chase down imports. It would be great if they only have to rm -rf the _vendor directory and pip itself just falls back to expecting a globally installed requests/distlib/whatever.

piotr-dobrogost commented 10 years ago

Just FYI, this was proposed and declined in requests recently. @abadger in https://github.com/kennethreitz/requests/pull/1812#issuecomment-30855865 proposed:

The strategy would be that requests.packages would check for the existence of bundled versions of urllib3, charade, etc. If those were available, it would implement requests.packages.$foo via the bundled versions. If they weren't available, it would implement them via the system packages. Distros could then simply rm the bundled versions in their packages in order to use system packages.

and @kennethreitz in https://github.com/kennethreitz/requests/pull/1812#issuecomment-30861909 declined:

I hope this doesn't come across as abrasive (it's not meant to be!) — but, Requests has been through all of these cycles already. We supported exactly what you're proposing for a long time. It was a waste of a time, and a big headache for me. The less branching and indeterminacy the codebase has, the better. Believe it or not, we also removed the bundled versions altogether for a good year! So many wasted lines in requirements.txt files around the world :) This is the only solution that I'm happy with. As a matter of fact, I'm extremely happy with the current design :)

warsaw commented 10 years ago

+1! I just devendorized pip for Debian: http://tinyurl.com/mgctd9n

dstufft commented 9 years ago

Fixed in #2131