diff --git a/crates/uv/tests/pip_compile_scenarios.rs b/crates/uv/tests/pip_compile_scenarios.rs index 34fa7a10e..865ce378e 100644 --- a/crates/uv/tests/pip_compile_scenarios.rs +++ b/crates/uv/tests/pip_compile_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with ./scripts/scenarios/update.py -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi"))] @@ -26,14 +26,23 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command { .arg("pip") .arg("compile") .arg("requirements.in") - .arg("--extra-index-url") + .arg("--index-url") .arg("https://test.pypi.org/simple") + .arg("--find-links") + .arg("https://raw.githubusercontent.com/zanieb/packse/de0bab473eeaa4445db5a8febd732c655fad3d52/vendor/links.html") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) .env("UV_NO_WRAP", "1") .env("UV_TEST_PYTHON_PATH", bin) .current_dir(&context.temp_dir); + + if cfg!(all(windows, debug_assertions)) { + // TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the + // default windows stack of 1MB + command.env("UV_STACK_SIZE", (8 * 1024 * 1024).to_string()); + } + command } @@ -74,7 +83,7 @@ fn requires_incompatible_python_version_compatible_override() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --extra-index-url https://test.pypi.org/simple --cache-dir [CACHE_DIR] --python-version=3.11 + # uv pip compile requirements.in --index-url https://test.pypi.org/simple --find-links https://raw.githubusercontent.com/zanieb/packse/de0bab473eeaa4445db5a8febd732c655fad3d52/vendor/links.html --cache-dir [CACHE_DIR] --python-version=3.11 albatross==1.0.0 ----- stderr ----- @@ -235,7 +244,7 @@ fn requires_incompatible_python_version_compatible_override_no_wheels_available_ exit_code: 0 ----- stdout ----- # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --extra-index-url https://test.pypi.org/simple --cache-dir [CACHE_DIR] --python-version=3.11 + # uv pip compile requirements.in --index-url https://test.pypi.org/simple --find-links https://raw.githubusercontent.com/zanieb/packse/de0bab473eeaa4445db5a8febd732c655fad3d52/vendor/links.html --cache-dir [CACHE_DIR] --python-version=3.11 albatross==1.0.0 ----- stderr ----- @@ -455,7 +464,7 @@ fn requires_python_patch_version_override_patch_compatible() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --extra-index-url https://test.pypi.org/simple --cache-dir [CACHE_DIR] --python-version=3.8.0 + # uv pip compile requirements.in --index-url https://test.pypi.org/simple --find-links https://raw.githubusercontent.com/zanieb/packse/de0bab473eeaa4445db5a8febd732c655fad3d52/vendor/links.html --cache-dir [CACHE_DIR] --python-version=3.8.0 albatross==1.0.0 ----- stderr ----- diff --git a/crates/uv/tests/pip_install_scenarios.rs b/crates/uv/tests/pip_install_scenarios.rs index e5a9c33bb..72fc72be3 100644 --- a/crates/uv/tests/pip_install_scenarios.rs +++ b/crates/uv/tests/pip_install_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with ./scripts/scenarios/update.py -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi"))] @@ -45,13 +45,22 @@ fn command(context: &TestContext) -> Command { command .arg("pip") .arg("install") - .arg("--extra-index-url") + .arg("--index-url") .arg("https://test.pypi.org/simple") + .arg("--find-links") + .arg("https://raw.githubusercontent.com/zanieb/packse/de0bab473eeaa4445db5a8febd732c655fad3d52/vendor/links.html") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) .env("UV_NO_WRAP", "1") .current_dir(&context.temp_dir); + + if cfg!(all(windows, debug_assertions)) { + // TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the + // default windows stack of 1MB + command.env("UV_STACK_SIZE", (8 * 1024 * 1024).to_string()); + } + command } @@ -477,7 +486,7 @@ fn dependency_excludes_range_of_compatible_versions() { /// There is a non-contiguous range of compatible versions for the requested package /// `a`, but another dependency `c` excludes the range. This is the same as /// `dependency-excludes-range-of-compatible-versions` but some of the versions of -/// `a` are incompatible for another reason e.g. dependency on non-existent package +/// `a` are incompatible for another reason e.g. dependency on non-existant package /// `d`. /// /// ```text @@ -737,7 +746,7 @@ fn multiple_extras_required() { /// all-extras-required /// -/// Multiple optional dependencies are requested for the via an 'all' extra. +/// Multiple optional dependencies are requested for the package via an 'all' extra. /// /// ```text /// 4cf56e90 diff --git a/scripts/scenarios/templates/compile.mustache b/scripts/scenarios/templates/compile.mustache index 7244754f7..98d820e97 100644 --- a/scripts/scenarios/templates/compile.mustache +++ b/scripts/scenarios/templates/compile.mustache @@ -26,14 +26,23 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command { .arg("pip") .arg("compile") .arg("requirements.in") - .arg("--extra-index-url") + .arg("--index-url") .arg("https://test.pypi.org/simple") + .arg("--find-links") + .arg("{{vendor_links}}") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) .env("UV_NO_WRAP", "1") .env("UV_TEST_PYTHON_PATH", bin) .current_dir(&context.temp_dir); + + if cfg!(all(windows, debug_assertions)) { + // TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the + // default windows stack of 1MB + command.env("UV_STACK_SIZE", (8 * 1024 * 1024).to_string()); + } + command } diff --git a/scripts/scenarios/templates/install.mustache b/scripts/scenarios/templates/install.mustache index 3a1bcbd13..b3a3811f1 100644 --- a/scripts/scenarios/templates/install.mustache +++ b/scripts/scenarios/templates/install.mustache @@ -46,13 +46,22 @@ fn command(context: &TestContext) -> Command { command .arg("pip") .arg("install") - .arg("--extra-index-url") + .arg("--index-url") .arg("https://test.pypi.org/simple") + .arg("--find-links") + .arg("{{vendor_links}}") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) .env("UV_NO_WRAP", "1") .current_dir(&context.temp_dir); + + if cfg!(all(windows, debug_assertions)) { + // TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the + // default windows stack of 1MB + command.env("UV_STACK_SIZE", (8 * 1024 * 1024).to_string()); + } + command } diff --git a/scripts/scenarios/update.py b/scripts/scenarios/update.py index c36eb6be4..dc8c5b5b7 100755 --- a/scripts/scenarios/update.py +++ b/scripts/scenarios/update.py @@ -45,7 +45,7 @@ import textwrap from pathlib import Path -PACKSE_COMMIT = "64b4451b832cece378f6e773d326ea09efe8903d" +PACKSE_COMMIT = "de0bab473eeaa4445db5a8febd732c655fad3d52" TOOL_ROOT = Path(__file__).parent TEMPLATES = TOOL_ROOT / "templates" INSTALL_TEMPLATE = TEMPLATES / "install.mustache" @@ -205,6 +205,9 @@ for template, tests, scenarios in [ # Add generated metadata data["generated_from"] = f"https://github.com/zanieb/packse/tree/{commit}/scenarios" data["generated_with"] = " ".join(sys.argv) + data[ + "vendor_links" + ] = f"https://raw.githubusercontent.com/zanieb/packse/{commit}/vendor/links.html" # Render the template print(f"Rendering template {template.name}", file=sys.stderr)