-
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
_vendor/README.rst: vendor.txt needed for debug #8436
Conversation
The debug command parses vendor.txt, so it's needed when debundling.
It appears you've included the commits of #8328 in this PR. Could you only submit the commit changing the README ? |
On Thursday, June 25, 2020 4:57:46 PM EDT Xavier Fernandez wrote:
It appears you've included the commits of #8328 in this PR.
Could you only submit the commit changing the README ?
Will do. There are some related changes about handling ipaddress that I want
to include as well, which I haven't finished yet.
|
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
@@ -0,0 +1 @@ | |||
The pip debug command takes module versions from vendor.txt even when they are debundled. Enhance the debug command output to instead show the location, name, and version of the debundled modules when appropriate. |
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 would name this with .vendor
, so when we generate news it gets more exposure to the people repackaging pip.
@@ -127,7 +127,7 @@ semi-supported method (that we don't test in our CI) and requires a bit of | |||
extra work on your end in order to solve the problems described above. | |||
|
|||
1. Delete everything in ``pip/_vendor/`` **except** for | |||
``pip/_vendor/__init__.py``. | |||
``pip/_vendor/__init__.py`` and ``pip/_vendor/vendor.txt``. |
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.
After these changes it won't be necessary to include vendor.txt
, correct?
@@ -63,6 +63,14 @@ def create_vendor_txt_map(): | |||
return dict(line.split('==', 1) for line in lines) # type: ignore | |||
|
|||
|
|||
def create_debundle_txt_map(): | |||
# type: () -> Dict[str, str] | |||
wheels = [fn for fn in os.listdir(pip._vendor.WHEEL_DIR)] |
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.
This will also catch non-wheel files (which are likely to exist if the wheels are in pip/_vendor
). We have a Wheel
helper in pip._internal.models.wheel
that can help distinguish those cases and get the name
and version
:
def _vendor_wheels():
for fn in os.listdir(pip._vendor.WHEEL_DIR):
try:
yield Wheel(fn)
except InvalidWheelFilename:
pass
def create_debundle_txt_map():
return {wheel.name: wheel.version for wheel in _vendor_wheels()}
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.
Same point as in #8328 (review)
WHEEL_DIR
is currently not the only mechanism used by distributions to debundle pip.
Closing since this is out of date and bitrotten. @kitterma Could you file a new PR for this? It'll need updating the news file fragment, and dealing with the merge conflict. |
The debug command parses vendor.txt, so it's needed when debundling.