-
Notifications
You must be signed in to change notification settings - Fork 544
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
Use installer
to remove custom unzip and spread code
#715
Use installer
to remove custom unzip and spread code
#715
Conversation
be8be48
to
bb5a7c4
Compare
70d851e
to
f37fe38
Compare
I can confirm that this passes our CI at $dayjob. That gives me some confidence that this change is robust to real-world use. The python dependency closure at $dayjob is ~110 direct dependencies and ~320 total in the transitive closure. The closure includes common dependencies such as |
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.
Change looks good. You've marked Refactoring (no functional changes, no api changes)
but also the "breaking change" checkbox.
Is this only breaking if rules consumers were depending on the existing layout within the runfiles directory?
Yes, exactly. I suspect those use-cases would not be very common. |
I think this is actually the first breaking change that drops python 3.6 support from rules_python...
did we intend that? we should document it very loudly if so |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Current behaviour uses bespoke code to unzip Python Wheels. This code does not utilise the PEP standards to unpack files and relies on some fragile globs to include and exclude files in the generated py_library.
What is the new behavior?
As mentioned in #700,
installer
can be used to unpack Wheels in a PEP standards compliant manner.In this PR
installer
is used to replace the custom purelib handling. It also unpacks Wheels into more standard path names that align with a standard Python installation orvenv
when inspectingsysconfig
.site-packages
- The destination for the source code (both purelib and platlib)include
- The location for any header filesbin
- The location for entry_point scriptsdata
- The location for Wheel dataThese path names more closely align with standard Python names either on a system or in a
venv
. See below.Similarly for a
venv
Does this PR introduce a breaking change?
Other information