Skip to content
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

Add support for PEP 730 iOS packaging #12962

Merged
merged 14 commits into from
Oct 8, 2024
Merged

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Sep 11, 2024

Adds support for PEP 730 iOS wheels. It will match any iOS wheel with the same multiarch configuration (i.e, arm64_iphoneos); it also matches any iOS minor version from iOS 12.0 (the first iOS version known to support all of CPython) to the version requested by the --platform argument.

This includes a patch to the vendored packaging library; this patch has been submitted upstream as pypa/packaging#832.

It also includes a patch to the vendored distlib library; this patch has been submitted upstream as pypa/distlib#231

Fixes #12961.

@freakboy3742
Copy link
Contributor Author

The vendoring CI check is failing because of the applied patch, which isn't surprising. The developer guide suggests there might be a way to specifically include patches; but if so, it's not clear how to set this up. Alternatively, I guess we have to wait until pypa/packaging#832 (or a variant of it) is merged, then update the vendor file.

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-vendor parts look good to me. Let’s wait for packaging to respond first; we can react later as needed.

@@ -8,7 +8,7 @@ def test_filenotfound_error_message(script: Any) -> None:
# Test the error message returned when using a bad 'file:' URL.
# make pip to fail and get an error message
# by running "pip install -r file:nonexistent_file"
proc = script.pip("install", "-r", "file:unexistent_file", expect_error=True)
proc = script.pip("install", "-r", "file:///unexistent_file", expect_error=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has been submitted separately as #12964; it's included here to prove CI isn't failing because of this patch.

@freakboy3742
Copy link
Contributor Author

Status update: pypa/packaging#832 has been merged; there's an additional vendored library change (pypa/distlib#231) that is awaiting review.

@freakboy3742
Copy link
Contributor Author

@uranusjr Both upstream patches have now been accepted and merged into their respective mainlines.

@freakboy3742
Copy link
Contributor Author

The test failures on macOS-12 appear related to #12951.

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending CI

@freakboy3742
Copy link
Contributor Author

This will need another merge with #12951 to get past CI.

@jezdez jezdez merged commit d5c8c11 into pypa:main Oct 8, 2024
34 checks passed
@notatallshaw
Copy link
Member

Were these changes pre-emptively vendored because otherwise pip would not be able to help support PEP 730 in its next release?

I ask because this seems at odds with the vendoring policy, maybe the policy should be loosened a bit to describe what exceptions are now expected?

@freakboy3742 freakboy3742 deleted the ios-support branch October 8, 2024 23:58
@freakboy3742
Copy link
Contributor Author

The changes that were vendored were all in aid of supporting PEP 730 tags; they've all been accepted upstream, and will form part of the upstream packages in their next release.

Whether that violates (or suggests a need for a change to) the vendoring policy is for someone higher than my pay grade to decide.

@uranusjr
Copy link
Member

uranusjr commented Oct 9, 2024

We did have precedence to apply a merged but unreleased patch in a vendored package so a feature can be released in pip before the upstream can make a release. It’s fine IMO considering packaging is a PyPA project and its maintainers have close(-ish) contact with pip’s.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
@sbidoul
Copy link
Member

sbidoul commented Oct 28, 2024

Heads-up here. This is causing some complaining with folks who devendor. Any opinion on that? #13053

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for PEP 730 iOS packaging tags
5 participants