-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Vendor pkg_resources #1434
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
Vendor pkg_resources #1434
Conversation
With the vendoring of pkg_resources we no longer need to worry about the version of the installed setuptools.
zipping up pip and the main.py I quoted in #1422 ever-so-nearly works as a portable, standalone pip:
That latter looks like a distlib issue. I'll post it to the distlib tracker for comments (it's not a huge deal in the grand scheme of things, though). |
FWIW I'd prefer to keep any changes to make this run as a zip file to the develop branch. It's kind of a stretch to add this to 1.5.1 since it's technically a new feature but I think unbreaking things for people who are using a system installed setuptools calls for the exception. But adding a feature that isn't needed for unbreaking things should go back to develop. |
Agreed - no intention that the run-in-a-zip-file stuff be for 1.5.1. I was just curious as to how close it was to working. |
This should be done now, letting the tests pass. |
YAY!!!! |
@@ -261,6 +261,15 @@ def url_name(self): | |||
|
|||
@property | |||
def setup_py(self): | |||
try: | |||
import pkg_resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be import setuptools
?
just noticed an interesting situation on ubuntu-precise
ubuntu has a python-pkg-resources
pkg, seperate from setuptools.
so import pkg_resources
works, but there's no setuptools, so I end up failing later with a different exception than yours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right. I just adapted this from the old check and didn't really think about it.
This vendors pkg_resources which means that there is no longer a hard check on setuptools version and infract pip can install things perfectly fine without setuptools installed as long as it's only installing Wheels.