From 72692734583a648c93ddc855f40f192db3c0dfbd Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 11 Jan 2025 20:37:57 -0500 Subject: [PATCH] Update packse to include `--python-platform` (#10531) ## Summary Relevant for: https://github.com/astral-sh/uv/pull/10527. --- crates/uv/tests/it/common/mod.rs | 2 +- crates/uv/tests/it/lock_scenarios.rs | 2 +- crates/uv/tests/it/pip_compile_scenarios.rs | 2 +- crates/uv/tests/it/pip_install_scenarios.rs | 5 ++++- scripts/scenarios/requirements.txt | 2 +- scripts/scenarios/templates/install.mustache | 3 +++ 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index b34a6faaf..7a25115f1 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -32,7 +32,7 @@ use uv_static::EnvVars; // Exclude any packages uploaded after this date. static EXCLUDE_NEWER: &str = "2024-03-25T00:00:00Z"; -pub const PACKSE_VERSION: &str = "0.3.42"; +pub const PACKSE_VERSION: &str = "0.3.43"; /// Using a find links url allows using `--index-url` instead of `--extra-index-url` in tests /// to prevent dependency confusion attacks against our test suite. diff --git a/crates/uv/tests/it/lock_scenarios.rs b/crates/uv/tests/it/lock_scenarios.rs index 377ab0641..831d9bf2a 100644 --- a/crates/uv/tests/it/lock_scenarios.rs +++ b/crates/uv/tests/it/lock_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi"))] #![allow(clippy::needless_raw_string_hashes)] diff --git a/crates/uv/tests/it/pip_compile_scenarios.rs b/crates/uv/tests/it/pip_compile_scenarios.rs index 722d3f0e0..93157dc32 100644 --- a/crates/uv/tests/it/pip_compile_scenarios.rs +++ b/crates/uv/tests/it/pip_compile_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi", unix))] diff --git a/crates/uv/tests/it/pip_install_scenarios.rs b/crates/uv/tests/it/pip_install_scenarios.rs index efd65ae30..1965a4f59 100644 --- a/crates/uv/tests/it/pip_install_scenarios.rs +++ b/crates/uv/tests/it/pip_install_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi", unix))] @@ -4079,6 +4079,7 @@ fn no_sdist_no_wheels_with_matching_abi() { filters.push((r"no-sdist-no-wheels-with-matching-abi-", "package-")); uv_snapshot!(filters, command(&context) + .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-abi-a") , @r###" success: false @@ -4119,6 +4120,7 @@ fn no_sdist_no_wheels_with_matching_platform() { filters.push((r"no-sdist-no-wheels-with-matching-platform-", "package-")); uv_snapshot!(filters, command(&context) + .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-platform-a") , @r###" success: false @@ -4159,6 +4161,7 @@ fn no_sdist_no_wheels_with_matching_python() { filters.push((r"no-sdist-no-wheels-with-matching-python-", "package-")); uv_snapshot!(filters, command(&context) + .arg("--python-platform=x86_64-manylinux2014") .arg("no-sdist-no-wheels-with-matching-python-a") , @r###" success: false diff --git a/scripts/scenarios/requirements.txt b/scripts/scenarios/requirements.txt index d6c9203d0..0a6f0cbcd 100644 --- a/scripts/scenarios/requirements.txt +++ b/scripts/scenarios/requirements.txt @@ -10,7 +10,7 @@ msgspec==0.18.6 # via packse packaging==24.2 # via hatchling -packse==0.3.42 +packse==0.3.43 # via -r scripts/scenarios/requirements.in pathspec==0.12.1 # via hatchling diff --git a/scripts/scenarios/templates/install.mustache b/scripts/scenarios/templates/install.mustache index 48f86e7ff..be425f929 100644 --- a/scripts/scenarios/templates/install.mustache +++ b/scripts/scenarios/templates/install.mustache @@ -88,6 +88,9 @@ fn {{module_name}}() { .arg("--no-binary") .arg("{{.}}") {{/resolver_options.no_binary}} + {{#resolver_options.python_platform}} + .arg("--python-platform={{.}}") + {{/resolver_options.python_platform}} {{#root.requires}} .arg("{{requirement}}") {{/root.requires}}, @r###"