From 0edb6602058a7da7c50cf79ca75fc48902cb94d1 Mon Sep 17 00:00:00 2001 From: konsti Date: Wed, 29 May 2024 17:31:39 +0200 Subject: [PATCH] Add missing i686 alias for x86 (#3899) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This alias is required for the 32-bit x86 manylinux builder. I've also changed the reporting level for unusable python interpreter errors to debug so it shows up with `-v`, otherwise we can't see what's broken: ```console # uv venv py312 --python python3.12 -vv 0.000461s DEBUG uv_interpreter::discovery Searching for Python 3.12 in search path × No interpreter found for Python 3.12 in search path ``` Reproduction: ```console $ docker run --rm -it quay.io/pypa/manylinux2014_i686 # curl -LsSf https://astral.sh/uv/install.sh | s # source $HOME/.cargo/env # RUST_LOG=trace uv venv py312 --python python3.12 DEBUG Searching for Python 3.12 in search path TRACE Searching PATH for executables: python3.12, python3, python TRACE Checking `PATH` directory for interpreters: /root/.cargo/bin TRACE Checking `PATH` directory for interpreters: /opt/rh/devtoolset-10/root/usr/bin TRACE Checking `PATH` directory for interpreters: /usr/local/sbin TRACE Checking `PATH` directory for interpreters: /usr/local/bin TRACE Found possible Python executable: /usr/local/bin/python3.12 TRACE Querying interpreter executable at /usr/local/bin/python3.12 TRACE Querying Python at `/usr/local/bin/python3.12` did not return the expected data unknown variant `i686`, expected one of `aarch64`, `armv6l`, `armv7l`, `powerpc64le`, `powerpc64`, `x86`, `x86_64`, `s390x` --- stdout: {"result": "success", "markers": {"implementation_name": "cpython", "implementation_version": "3.12.3", "os_name": "posix", "platform_machine": "i686", "platform_python_implementation": "CPython", "platform_release": "6.1.0-10-amd64", "platform_system": "Linux", "platform_version": "#1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03)", "python_full_version": "3.12.3", "python_version": "3.12", "sys_platform": "linux"}, "base_prefix": "/opt/_internal/cpython-3.12.3", "base_exec_prefix": "/opt/_internal/cpython-3.12.3", "prefix": "/opt/_internal/cpython-3.12.3", "base_executable": "/usr/local/bin/python3.12", "sys_executable": "/usr/local/bin/python3.12", "sys_path": ["/root/.cache/uv/.tmp7k64ZY", "/opt/_internal/cpython-3.12.3/lib/python312.zip", "/opt/_internal/cpython-3.12.3/lib/python3.12", "/opt/_internal/cpython-3.12.3/lib/python3.12/lib-dynload", "/opt/_internal/cpython-3.12.3/lib/python3.12/site-packages"], "stdlib": "/opt/_internal/cpython-3.12.3/lib/python3.12", "scheme": {"platlib": "/opt/_internal/cpython-3.12.3/lib/python3.12/site-packages", "purelib": "/opt/_internal/cpython-3.12.3/lib/python3.12/site-packages", "include": "/opt/_internal/cpython-3.12.3/include/python3.12", "scripts": "/opt/_internal/cpython-3.12.3/bin", "data": "/opt/_internal/cpython-3.12.3"}, "virtualenv": {"purelib": "lib/python3.12/site-packages", "platlib": "lib/python3.12/site-packages", "include": "include/site/python3.12", "scripts": "bin", "data": ""}, "platform": {"os": {"name": "manylinux", "major": 2, "minor": 17}, "arch": "i686"}, "gil_disabled": false, "pointer_size": "32"} --- stderr: --- TRACE Skipping bad interpreter at /usr/local/bin/python3.12 TRACE Checking `PATH` directory for interpreters: /usr/sbin TRACE Checking `PATH` directory for interpreters: /usr/bin TRACE Found possible Python executable: /usr/bin/python TRACE Querying interpreter executable at /usr/bin/python TRACE Can't use Python at `/usr/bin/python` TRACE Skipping bad interpreter at /usr/bin/python TRACE Checking `PATH` directory for interpreters: /sbin TRACE Checking `PATH` directory for interpreters: /bin TRACE Found possible Python executable: /bin/python TRACE Querying interpreter executable at /bin/python TRACE Can't use Python at `/bin/python` TRACE Skipping bad interpreter at /bin/python ``` --- Cargo.toml | 2 +- crates/platform-tags/src/platform.rs | 2 +- crates/uv-interpreter/src/discovery.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d48c72db3da0..9b6ae350c0cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,7 +120,7 @@ rustc-hash = { version = "1.1.0" } same-file = { version = "1.0.6" } schemars = { version = "0.8.16", features = ["url"] } seahash = { version = "4.1.0" } -serde = { version = "1.0.197" } +serde = { version = "1.0.197", features = ["derive"] } serde_json = { version = "1.0.114" } sha1 = { version = "0.10.6" } sha2 = { version = "0.10.8" } diff --git a/crates/platform-tags/src/platform.rs b/crates/platform-tags/src/platform.rs index 9319aee9a2f9..5cb9d9728b62 100644 --- a/crates/platform-tags/src/platform.rs +++ b/crates/platform-tags/src/platform.rs @@ -79,7 +79,7 @@ pub enum Arch { Armv7L, Powerpc64Le, Powerpc64, - #[serde(alias = "i386")] + #[serde(alias = "i386", alias = "i686")] X86, #[serde(alias = "amd64")] X86_64, diff --git a/crates/uv-interpreter/src/discovery.rs b/crates/uv-interpreter/src/discovery.rs index d823211b7dd5..129b4ddca6d8 100644 --- a/crates/uv-interpreter/src/discovery.rs +++ b/crates/uv-interpreter/src/discovery.rs @@ -375,7 +375,7 @@ fn python_interpreters<'a>( ); }) .map_err(Error::from) - .inspect_err(|err| trace!("{err}")), + .inspect_err(|err| debug!("{err}")), Err(err) => Err(err), }) .filter(move |result| match result {