Remove use of platform-site for other-arch macOS wheel installs.#2163
Remove use of platform-site for other-arch macOS wheel installs.#2163mhsmith merged 6 commits intobeeware:mainfrom
Conversation
614d62e to
6368b83
Compare
|
@mhsmith This has some overlap with #2162, in that this PR adds a new platform quirk, and that PR moves the location of platform quirks to the common macOS folder. As a stop-gap measure, I've added the platform quirk for this PR directly to the base macOS file, so it's an easier merge. This change is a blocker on landing the updated Python 3.13 support package, which is needed to submit the cibuildwheel iOS patch. |
|
fwiw, a list of packages on PyPI serving a lot of sdists (published feb 2024): https://discuss.python.org/t/358-most-popular-python-packages-have-wheels/43558/11 The list isn't perfect for this because it includes packages with macOS wheels but still have high sdists downloads. However, Note: please ignore if I'm interpreting "forces the use of binary wheels on macOS" incorrectly. |
That's correct - it wouldn't be. However, I haven't checked all the packages mentioned on that thread, but many of them ( I only found two that were potentially concerning.
The remaining ones that don't have wheels ( I only found one ( I'm sure there are others - but at the end of the day, I'm comfortable to use what limited influence BeeWare/Briefcase has as a project to encourage laggards to add add wheels to their release procedures. There's very little argument for not producing wheels, and plenty of arguments why they should be actively encouraged. |
|
|
||
| Briefcase *cannot* install packages published as source tarballs into a macOS app, even | ||
| if the package is a pure Python package that would produce a ``py3-none-any`` wheel. | ||
| This is an inherent limitation in the use of source tarballs as a distribution format. |
There was a problem hiding this comment.
That's not really true; it's a limitation in Briefcase.
There was a problem hiding this comment.
I'll stand by this statement. It's not possible to tell purely from a tarball whether a package will produce a binary or non-binary wheel, or to establish anything about the build environments that are supported by the project. That's an inherent limitation in source tarballs as a distribution format for Python artefacts.
I don't follow why this is necessary. This PR changes the way in which the "other" architecture is installed, but that was already using |
599334f to
1633937
Compare
For consistency. If you have one user building on x86_64, and one on ARM64, you can get different results depending on which is the host platform and exactly which binary wheels are available, because only the "off" platform is enforcing a "binary only" limitation. |
|
@mhsmith As discussed in person, I've added an explanatory comment for why we're using |
A follow up on #2155.
macOS was previously using a
platform-siteto allow for the installation of 'other-arch' binary wheel installations (i.e., installing x86_64 wheels when running on arm64 when a universal2 wheel isn't available). With the platform-site being replaced withplatform-config, this gives us an opportunity to remove the use of the platform-site hack on macOS, using native pip--platformhandling instead.This forces the use of binary wheels on macOS - but that's broadly advisable anyway, and avoids having to handle pip's error messages when a local wheel compilation fails.
Also includes a tweak to the Apple input filters to catch a change in log preamble output that iOS started generating with (AFIACT) Xcode 16.
PR Checklist: