-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Vendored pex
in pants
does not know how to find arm64
compatible packages on mac OS
#1384
Comments
There are 0 Mac specific wheels on PyPI for setproctitle 1.2.2: https://pypi.org/project/setproctitle/1.2.2/#files So, Pex must be building the sdist into a wheel (via |
@chrisjrn to confirm this is a Pex problem and not a Pants problem, does |
I have no access to this hardware, even via CI; so I appreciate all the digging you can do to help debug this. |
I do not reproduce this on my M1: I'm wondering if perhaps Chris's Python interpreter being used was an Intel interpreter trying to run in Arm mode, for example. I agree it'll be helpful for Chris to run Pex directly and remove Pants from the equation. |
As suspected by @Eric-Arellano, I was able to reproduce this in pex, for an Intel binary from Homebrew (v3.9.5 or v3.9.6). It does not occur on an ARM binary from Homebrew (v3.9.6). |
The specific error was:
|
OK. I'm pretty sure this is an instance of #1020. Namely, the sequence is: As outlined in #1020 - Pex currently 1st picks a runtime interpreter using the IC constraint, then tries a resolve, then fails. Instead, it should iterate through all interpreters matching the IC and try each one against a bootstrap resolve picking one from among those that work and onl failing if none do. *Note that Pants is probably picking out the arm64 interpreter in practice and running Pex build with that. Since Pex always tests the current interpreter for compliance with constraints and uses that when applicable (for perf - skips a re-exec), this is the wedge in which the build time and runtime interpreter selection result could be different on the same machine. |
This is techinically a dup, but I'll leave it open to circle back and get a test from you @chrisjrn or @Eric-Arellano once #1020 is fixed since the whole arm thing is so bespoke right now. |
With the introduction of |
PyPI supports a new
universal2
binary format for Mac OS 11 installs that work on both ARM64 and x86_64 architectures.Attempting to run pytest on an architecture-aware install of Pants gives an error of the following form:
We should be downloading the
universal2
package in this case, but we aren't.I think the problem may be here: this is the relevant vendored copy of
sysconfig.py
from pex:https://github.com/pantsbuild/pex/blob/main/pex/vendor/_vendored/pip/pip/_vendor/distlib/_backport/sysconfig.py#L729-L740
and here's the corresponding code from an up-to-date version of the relevant file from Python 3.9:
https://github.com/python/cpython/blob/3.9/Lib/_osx_support.py#L542-L555
The text was updated successfully, but these errors were encountered: