From 249ca1076588132394479903830f5ad9d6f02f7f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 15 Jan 2024 11:36:45 -0500 Subject: [PATCH] Move Puffin subcommands to a pip namespace (#921) ## Summary This makes the separation clearer between the legacy `pip` API and the API we'll add in the future for the package manager itself. It also enables seamless `puffin pip` aliasing for those that want it. Closes #918. --- README.md | 34 +-- crates/distribution-types/src/lib.rs | 2 +- crates/puffin-cache/src/lib.rs | 8 +- crates/puffin-cli/src/commands/pip_install.rs | 2 +- crates/puffin-cli/src/main.rs | 54 +++- crates/puffin-cli/tests/pip_compile.rs | 288 +++++++++++------- crates/puffin-cli/tests/pip_install.rs | 54 ++-- .../puffin-cli/tests/pip_install_scenarios.rs | 114 ++++--- crates/puffin-cli/tests/pip_sync.rs | 213 ++++++++----- crates/puffin-cli/tests/pip_uninstall.rs | 56 ++-- scripts/bench/__main__.py | 14 +- scripts/bench/requirements.txt | 2 +- scripts/benchmarks/compile.sh | 2 +- scripts/benchmarks/sync.sh | 6 +- scripts/requirements/compiled/all-kinds.txt | 2 +- scripts/requirements/compiled/black.txt | 2 +- scripts/requirements/compiled/boto3.txt | 2 +- scripts/requirements/compiled/dtlssocket.txt | 2 +- scripts/requirements/compiled/flyte.txt | 2 +- scripts/requirements/compiled/pdm_2193.txt | 2 +- scripts/requirements/compiled/scispacy.txt | 2 +- scripts/requirements/compiled/trio.txt | 2 +- scripts/scenarios/template.mustache | 3 +- 23 files changed, 553 insertions(+), 315 deletions(-) diff --git a/README.md b/README.md index 147620b74..1aef5a208 100644 --- a/README.md +++ b/README.md @@ -34,22 +34,22 @@ puffin venv # Create a virtual environment at .venv. To install a package into the virtual environment: ```shell -puffin pip-install flask # Install Flask. -puffin pip-install -r requirements.txt # Install from a requirements.txt file. -puffin pip-install -e . # Install the current project in editable mode. +puffin pip install flask # Install Flask. +puffin pip install -r requirements.txt # Install from a requirements.txt file. +puffin pip install -e . # Install the current project in editable mode. ``` To generate a set of locked dependencies from an input file: ```shell -puffin pip-compile pyproject.toml -o requirements.txt # Read a pyproject.toml file. -puffin pip-compile requirements.in -o requirements.txt # Read a requirements.in file. +puffin pip compile pyproject.toml -o requirements.txt # Read a pyproject.toml file. +puffin pip compile requirements.in -o requirements.txt # Read a requirements.in file. ``` To install a set of locked dependencies into the virtual environment: ```shell -puffin pip-sync requirements.txt # Install from a requirements.txt file. +puffin pip sync requirements.txt # Install from a requirements.txt file. ``` Puffin's `pip-install` and `pip-compile` commands supports many of the same command-line arguments @@ -102,7 +102,7 @@ Puffin's `requirements.txt` files may not be portable across platforms and Pytho Puffin itself does not depend on Python, but it does need to locate a Python environment to (1) install dependencies into the environment, and (2) build source distributions. -When running `pip-sync` or `pip-install`, Puffin will search for a virtual environment in the +When running `pip sync` or `pip install`, Puffin will search for a virtual environment in the following order: - An activated virtual environment based on the `VIRTUAL_ENV` environment variable. @@ -112,7 +112,7 @@ following order: If no virtual environment is found, Puffin will prompt the user to create one in the current directory via `puffin venv`. -When running `pip-compile`, Puffin does not _require_ a virtual environment and will search for a +When running `pip compile`, Puffin does not _require_ a virtual environment and will search for a Python interpreter in the following order: - An activated virtual environment based on the `VIRTUAL_ENV` environment variable. @@ -131,21 +131,21 @@ The specifics of Puffin's caching semantics vary based on the nature of the depe - **For direct URL dependencies**, Puffin respects HTTP caching headers, and also caches based on the URL itself. - **For Git dependencies**, Puffin caches based on the fully-resolved Git commit hash. As such, - `puffin pip-compile` will pin Git dependencies to a specific commit hash when writing the resolved + `puffin pip compile` will pin Git dependencies to a specific commit hash when writing the resolved dependency set. - **For local dependencies**, Puffin caches based on the last-modified time of the `setup.py` or `pyproject.toml` file. If you're running into caching issues, Puffin includes a few escape hatches: -- To force Puffin to ignore cached data for all dependencies, run `puffin pip-install --reinstall ...`. -- To force Puffin to ignore cached data for a specific dependency, run, e.g., `puffin pip-install --reinstall-package flask ...`. +- To force Puffin to ignore cached data for all dependencies, run `puffin pip install --reinstall ...`. +- To force Puffin to ignore cached data for a specific dependency, run, e.g., `puffin pip install --reinstall-package flask ...`. - To clear the global cache entirely, run `puffin clean`. ### Resolution strategy By default, Puffin follows the standard Python dependency resolution strategy of preferring the -latest compatible version of each package. For example, `puffin pip-install flask>=2.0.0` will +latest compatible version of each package. For example, `puffin pip install flask>=2.0.0` will install the latest version of Flask (at time of writing: `3.0.0`). However, Puffin's resolution strategy be configured to prefer the _lowest_ compatible version of @@ -159,11 +159,11 @@ For example, given the following `requirements.in` file: flask>=2.0.0 ``` -Running `puffin pip-compile requirements.in` would produce the following `requirements.txt` file: +Running `puffin pip compile requirements.in` would produce the following `requirements.txt` file: ```text # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile requirements.in +# puffin pip compile requirements.in blinker==1.7.0 # via flask click==8.1.7 @@ -181,11 +181,11 @@ werkzeug==3.0.1 # via flask ``` -However, `puffin pip-compile --resolution=lowest requirements.in` would instead produce: +However, `puffin pip compile --resolution=lowest requirements.in` would instead produce: ```text # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile requirements.in --resolution=lowest +# puffin pip compile requirements.in --resolution=lowest click==7.1.2 # via flask flask==2.0.0 @@ -248,7 +248,7 @@ not yet produce a machine-agnostic lockfile. However, Puffin _does_ support resolving for alternate Python versions via the `--python-version` command line argument. For example, if you're running Puffin on Python 3.9, but want to resolve for -Python 3.8, you can run `puffin pip-compile --python-version=3.8 requirements.in` to produce a +Python 3.8, you can run `puffin pip compile --python-version=3.8 requirements.in` to produce a Python 3.8-compatible resolution. ## Acknowledgements diff --git a/crates/distribution-types/src/lib.rs b/crates/distribution-types/src/lib.rs index e3b0b64a8..5a487807f 100644 --- a/crates/distribution-types/src/lib.rs +++ b/crates/distribution-types/src/lib.rs @@ -1,6 +1,6 @@ //! ## Type hierarchy //! -//! When we receive the requirements from `pip-sync`, we check which requirements already fulfilled +//! When we receive the requirements from `pip sync`, we check which requirements already fulfilled //! in the users environment ([`InstalledDist`]), whether the matching package is in our wheel cache //! ([`CachedDist`]) or whether we need to download, (potentially build) and install it ([`Dist`]). //! These three variants make up [`BuiltDist`]. diff --git a/crates/puffin-cache/src/lib.rs b/crates/puffin-cache/src/lib.rs index efa38aaf3..7477b1ead 100644 --- a/crates/puffin-cache/src/lib.rs +++ b/crates/puffin-cache/src/lib.rs @@ -197,7 +197,7 @@ pub enum CacheBucket { /// flask @ https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl /// ``` /// - /// When we run `pip-compile`, it will only fetch and cache the metadata (and cache policy), it + /// When we run `pip compile`, it will only fetch and cache the metadata (and cache policy), it /// doesn't need the actual wheels yet: /// ```text /// wheel-v0 @@ -212,7 +212,7 @@ pub enum CacheBucket { /// └── flask-3.0.0-py3-none-any.msgpack /// ``` /// - /// We get the following `requirement.txt` from `pip-compile`: + /// We get the following `requirement.txt` from `pip compile`: /// /// ```text /// [...] @@ -222,7 +222,7 @@ pub enum CacheBucket { /// [...] /// ``` /// - /// If we run `pip-sync` on `requirements.txt` on a different machine, it also fetches the + /// If we run `pip sync` on `requirements.txt` on a different machine, it also fetches the /// wheels: /// /// TODO(konstin): This is still wrong, we need to store the cache policy too! @@ -244,7 +244,7 @@ pub enum CacheBucket { /// └── ... /// ``` /// - /// If we run first `pip-compile` and then `pip-sync` on the same machine, we get both: + /// If we run first `pip compile` and then `pip sync` on the same machine, we get both: /// /// ```text /// wheels-v0 diff --git a/crates/puffin-cli/src/commands/pip_install.rs b/crates/puffin-cli/src/commands/pip_install.rs index 272915274..8d89f171d 100644 --- a/crates/puffin-cli/src/commands/pip_install.rs +++ b/crates/puffin-cli/src/commands/pip_install.rs @@ -328,7 +328,7 @@ async fn build_editables( Ok(editables) } -/// Resolve a set of requirements, similar to running `pip-compile`. +/// Resolve a set of requirements, similar to running `pip compile`. #[allow(clippy::too_many_arguments)] async fn resolve( requirements: Vec, diff --git a/crates/puffin-cli/src/main.rs b/crates/puffin-cli/src/main.rs index c7f20e646..c9588115f 100644 --- a/crates/puffin-cli/src/main.rs +++ b/crates/puffin-cli/src/main.rs @@ -63,18 +63,10 @@ struct Cli { #[derive(Subcommand)] #[allow(clippy::large_enum_variant)] enum Commands { - /// Compile a `requirements.in` file to a `requirements.txt` file. - PipCompile(PipCompileArgs), - /// Sync dependencies from a `requirements.txt` file. - PipSync(PipSyncArgs), - /// Install packages into the current environment. - PipInstall(PipInstallArgs), - /// Uninstall packages from the current environment. - PipUninstall(PipUninstallArgs), - /// Enumerate the installed packages in the current environment. - PipFreeze(PipFreezeArgs), + /// Resolve and install Python packages. + Pip(PipArgs), /// Create a virtual environment. - #[clap(alias = "virtualenv")] + #[clap(alias = "virtualenv", alias = "v")] Venv(VenvArgs), /// Clear the cache. Clean(CleanArgs), @@ -86,6 +78,26 @@ enum Commands { Remove(RemoveArgs), } +#[derive(Args)] +struct PipArgs { + #[clap(subcommand)] + command: PipCommand, +} + +#[derive(Subcommand)] +enum PipCommand { + /// Compile a `requirements.in` file to a `requirements.txt` file. + Compile(PipCompileArgs), + /// Sync dependencies from a `requirements.txt` file. + Sync(PipSyncArgs), + /// Install packages into the current environment. + Install(PipInstallArgs), + /// Uninstall packages from the current environment. + Uninstall(PipUninstallArgs), + /// Enumerate the installed packages in the current environment. + Freeze(PipFreezeArgs), +} + /// Clap parser for the union of date and datetime fn date_or_datetime(input: &str) -> Result, String> { let date_err = match NaiveDate::from_str(input) { @@ -509,7 +521,9 @@ async fn inner() -> Result { let cache = Cache::try_from(cli.cache_args)?; match cli.command { - Commands::PipCompile(args) => { + Commands::Pip(PipArgs { + command: PipCommand::Compile(args), + }) => { let requirements = args .src_file .into_iter() @@ -562,7 +576,9 @@ async fn inner() -> Result { ) .await } - Commands::PipSync(args) => { + Commands::Pip(PipArgs { + command: PipCommand::Sync(args), + }) => { let index_urls = IndexLocations::from_args( args.index_url, args.extra_index_url, @@ -592,7 +608,9 @@ async fn inner() -> Result { ) .await } - Commands::PipInstall(args) => { + Commands::Pip(PipArgs { + command: PipCommand::Install(args), + }) => { let requirements = args .package .into_iter() @@ -647,7 +665,9 @@ async fn inner() -> Result { ) .await } - Commands::PipUninstall(args) => { + Commands::Pip(PipArgs { + command: PipCommand::Uninstall(args), + }) => { let sources = args .package .into_iter() @@ -657,8 +677,10 @@ async fn inner() -> Result { .collect::>(); commands::pip_uninstall(&sources, cache, printer).await } + Commands::Pip(PipArgs { + command: PipCommand::Freeze(args), + }) => commands::freeze(&cache, args.strict, printer), Commands::Clean(args) => commands::clean(&cache, &args.package, printer), - Commands::PipFreeze(args) => commands::freeze(&cache, args.strict, printer), Commands::Venv(args) => { let index_locations = IndexLocations::from_args( args.index_url, diff --git a/crates/puffin-cli/tests/pip_compile.rs b/crates/puffin-cli/tests/pip_compile.rs index 295aec0f1..6741b6db0 100644 --- a/crates/puffin-cli/tests/pip_compile.rs +++ b/crates/puffin-cli/tests/pip_compile.rs @@ -33,7 +33,8 @@ fn compile_requirements_in() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -45,7 +46,7 @@ fn compile_requirements_in() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] asgiref==3.7.2 # via django django==5.0b1 @@ -67,7 +68,8 @@ fn missing_requirements_in() -> Result<()> { let requirements_in = temp_dir.child("requirements.in"); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -93,7 +95,8 @@ fn missing_venv() -> Result<()> { let venv = temp_dir.child(".venv"); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -137,7 +140,8 @@ dependencies = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--cache-dir") .arg(cache_dir.path()) @@ -149,7 +153,7 @@ dependencies = [ exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile pyproject.toml --cache-dir [CACHE_DIR] + # puffin pip compile pyproject.toml --cache-dir [CACHE_DIR] asgiref==3.7.2 # via django django==5.0b1 @@ -181,7 +185,8 @@ fn compile_constraints_txt() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--constraint") .arg("constraints.txt") @@ -195,7 +200,7 @@ fn compile_constraints_txt() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] asgiref==3.7.2 # via django django==5.0b1 @@ -228,7 +233,8 @@ fn compile_constraints_inline() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -240,7 +246,7 @@ fn compile_constraints_inline() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] ----- stderr ----- Resolved 0 packages in [TIME] @@ -271,7 +277,8 @@ fn compile_constraints_markers() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--constraint") .arg("constraints.txt") @@ -285,7 +292,7 @@ fn compile_constraints_markers() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] anyio==4.0.0 idna==3.4 # via anyio @@ -325,7 +332,8 @@ optional-dependencies.foo = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--extra") .arg("foo") @@ -339,7 +347,7 @@ optional-dependencies.foo = [ exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile pyproject.toml --extra foo --cache-dir [CACHE_DIR] + # puffin pip compile pyproject.toml --extra foo --cache-dir [CACHE_DIR] asgiref==3.7.2 # via django django==5.0b1 @@ -379,7 +387,8 @@ optional-dependencies."FrIeNdLy-._.-bArD" = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--extra") .arg("FRiENDlY-...-_-BARd") @@ -393,7 +402,7 @@ optional-dependencies."FrIeNdLy-._.-bArD" = [ exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile pyproject.toml --extra FRiENDlY-...-_-BARd --cache-dir [CACHE_DIR] + # puffin pip compile pyproject.toml --extra FRiENDlY-...-_-BARd --cache-dir [CACHE_DIR] asgiref==3.7.2 # via django django==5.0b1 @@ -433,7 +442,8 @@ optional-dependencies.foo = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--extra") .arg("bar") @@ -480,7 +490,8 @@ optional-dependencies.foo = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--extra") .arg("foo") @@ -520,7 +531,8 @@ fn compile_requirements_file_extra() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -567,7 +579,8 @@ optional-dependencies.foo = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--extra") .arg("invalid name!") @@ -605,7 +618,8 @@ fn compile_python_312() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--python-version") .arg("3.12") @@ -619,7 +633,7 @@ fn compile_python_312() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --python-version 3.12 --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --python-version 3.12 --cache-dir [CACHE_DIR] black==23.10.1 click==8.1.7 # via black @@ -654,7 +668,8 @@ fn compile_python_37() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--python-version") .arg("3.7") @@ -693,7 +708,8 @@ fn compile_python_invalid_version() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--python-version") .arg("3.7.x") @@ -724,7 +740,8 @@ fn compile_python_dev_version() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--python-version") .arg("3.7-dev") @@ -771,7 +788,8 @@ fn compile_numpy_py38() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -784,7 +802,7 @@ fn compile_numpy_py38() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] numpy==1.24.4 ----- stderr ----- @@ -809,7 +827,8 @@ fn compile_wheel_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -821,7 +840,7 @@ fn compile_wheel_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -862,7 +881,8 @@ fn compile_sdist_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -874,7 +894,7 @@ fn compile_sdist_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -919,7 +939,8 @@ fn compile_git_https_dependency() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -931,7 +952,7 @@ fn compile_git_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -971,7 +992,8 @@ fn compile_git_branch_https_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -983,7 +1005,7 @@ fn compile_git_branch_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] click==8.1.7 # via flask flask @ git+https://github.com/pallets/flask.git@d92b64aa275841b0c9aea3903aba72fbc4275d91 @@ -1021,7 +1043,8 @@ fn compile_git_tag_https_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1033,7 +1056,7 @@ fn compile_git_tag_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -1075,7 +1098,8 @@ fn compile_git_long_commit_https_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1087,7 +1111,7 @@ fn compile_git_long_commit_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] click==8.1.7 # via flask flask @ git+https://github.com/pallets/flask.git@d92b64aa275841b0c9aea3903aba72fbc4275d91 @@ -1125,7 +1149,8 @@ fn compile_git_short_commit_https_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1137,7 +1162,7 @@ fn compile_git_short_commit_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] click==8.1.7 # via flask flask @ git+https://github.com/pallets/flask.git@d92b64aa275841b0c9aea3903aba72fbc4275d91 @@ -1176,7 +1201,8 @@ fn compile_git_refs_https_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1188,7 +1214,7 @@ fn compile_git_refs_https_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -1228,7 +1254,8 @@ fn compile_git_subdirectory_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1240,7 +1267,7 @@ fn compile_git_subdirectory_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] example-pkg-a @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a ----- stderr ----- @@ -1267,7 +1294,8 @@ fn compile_git_concurrent_access() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1279,7 +1307,7 @@ fn compile_git_concurrent_access() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] example-pkg-a @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_a example-pkg-b @ git+https://github.com/pypa/sample-namespace-packages.git@df7530eeb8fa0cb7dbb8ecb28363e8e36bfa2f45#subdirectory=pkg_resources/pkg_b @@ -1307,7 +1335,8 @@ fn compile_git_mismatched_name() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1343,7 +1372,8 @@ fn mixed_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1355,7 +1385,7 @@ fn mixed_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -1395,7 +1425,8 @@ fn conflicting_direct_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1433,7 +1464,8 @@ fn compatible_direct_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1445,7 +1477,7 @@ fn compatible_direct_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] werkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl ----- stderr ----- @@ -1470,7 +1502,8 @@ fn conflicting_repeated_url_dependency_version_mismatch() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1509,7 +1542,8 @@ fn conflicting_repeated_url_dependency_version_match() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1546,7 +1580,8 @@ fn conflicting_transitive_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1587,7 +1622,8 @@ fn disallowed_transitive_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1626,7 +1662,8 @@ fn allowed_transitive_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--constraint") .arg("constraints.txt") @@ -1640,7 +1677,7 @@ fn allowed_transitive_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] transitive-url-dependency @ https://github.com/astral-sh/ruff/files/13257454/transitive_url_dependency.zip werkzeug @ git+https://github.com/pallets/werkzeug@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74 # via transitive-url-dependency @@ -1673,7 +1710,8 @@ fn allowed_transitive_canonical_url_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--constraint") .arg("constraints.txt") @@ -1687,7 +1725,7 @@ fn allowed_transitive_canonical_url_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR] transitive-url-dependency @ https://github.com/astral-sh/ruff/files/13257454/transitive_url_dependency.zip werkzeug @ git+https://github.com/pallets/werkzeug@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74 # via transitive-url-dependency @@ -1728,7 +1766,8 @@ optional-dependencies.bar = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--all-extras") .arg("--cache-dir") @@ -1741,7 +1780,7 @@ optional-dependencies.bar = [ exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile pyproject.toml --all-extras --cache-dir [CACHE_DIR] + # puffin pip compile pyproject.toml --all-extras --cache-dir [CACHE_DIR] anyio==4.0.0 # via httpcore asgiref==3.7.2 @@ -1797,7 +1836,8 @@ optional-dependencies.bar = [ filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--all-extras") .arg("--extra") @@ -1816,7 +1856,7 @@ optional-dependencies.bar = [ ----- stderr ----- error: the argument '--all-extras' cannot be used with '--extra ' - Usage: puffin pip-compile --all-extras --cache-dir [CACHE_DIR] + Usage: puffin pip compile --all-extras --cache-dir [CACHE_DIR] For more information, try '--help'. "###); @@ -1847,7 +1887,8 @@ dependencies = ["django==5.0b1", "django==5.0a1"] filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1892,7 +1933,8 @@ dependencies = ["django==300.1.4"] filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("pyproject.toml") .arg("--cache-dir") .arg(cache_dir.path()) @@ -1929,7 +1971,8 @@ fn compile_exclude_newer() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--exclude-newer") // 4.64.0: 2022-04-04T01:48:46.194635Z1 @@ -1943,7 +1986,7 @@ fn compile_exclude_newer() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --exclude-newer 2022-04-04T12:00:00Z --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --exclude-newer 2022-04-04T12:00:00Z --cache-dir [CACHE_DIR] tqdm==4.64.0 ----- stderr ----- @@ -1957,7 +2000,8 @@ fn compile_exclude_newer() -> Result<()> { // Use a date as input instead. // We interpret a date as including this day assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--exclude-newer") .arg("2022-04-04") @@ -1969,7 +2013,7 @@ fn compile_exclude_newer() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --exclude-newer 2022-04-04 --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --exclude-newer 2022-04-04 --cache-dir [CACHE_DIR] tqdm==4.64.0 ----- stderr ----- @@ -1982,7 +2026,8 @@ fn compile_exclude_newer() -> Result<()> { }, { // Check the error message for invalid datetime assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--exclude-newer") .arg("2022-04-04+02:00") @@ -2029,7 +2074,8 @@ fn compile_wheel_path_dependency() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2041,7 +2087,7 @@ fn compile_wheel_path_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2091,7 +2137,8 @@ fn compile_source_distribution_path_dependency() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2103,7 +2150,7 @@ fn compile_source_distribution_path_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2147,7 +2194,8 @@ fn compile_wheel_path_dependency_missing() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2182,7 +2230,8 @@ fn compile_yanked_version_direct() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2194,7 +2243,7 @@ fn compile_yanked_version_direct() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] attrs==21.1.0 ----- stderr ----- @@ -2219,7 +2268,8 @@ fn compile_yanked_version_indirect() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2260,7 +2310,8 @@ fn override_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--override") .arg("overrides.txt") @@ -2274,7 +2325,7 @@ fn override_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --override overrides.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --override overrides.txt --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2319,7 +2370,8 @@ fn override_multi_dependency() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--override") .arg("overrides.txt") @@ -2333,7 +2385,7 @@ fn override_multi_dependency() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --override overrides.txt --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --override overrides.txt --cache-dir [CACHE_DIR] black==23.10.1 click==8.1.7 # via black @@ -2370,7 +2422,8 @@ fn missing_registry_extra() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2382,7 +2435,7 @@ fn missing_registry_extra() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] black==23.10.1 click==8.1.7 # via black @@ -2418,7 +2471,8 @@ fn missing_url_extra() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2430,7 +2484,7 @@ fn missing_url_extra() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2471,7 +2525,8 @@ fn preserve_url() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2483,7 +2538,7 @@ fn preserve_url() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2529,7 +2584,8 @@ fn preserve_env_var() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2541,7 +2597,7 @@ fn preserve_env_var() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] blinker==1.7.0 # via flask click==8.1.7 @@ -2590,7 +2646,8 @@ fn compile_editable() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg(requirements_in.path()) .arg("--cache-dir") .arg(cache_dir.path()) @@ -2601,7 +2658,7 @@ fn compile_editable() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] boltons==23.1.1 -e ../../scripts/editable-installs/maturin_editable numpy==1.26.2 @@ -2659,7 +2716,8 @@ fn cache_errors_are_non_fatal() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg(requirements_in.path()) .arg("--cache-dir") .arg(cache_dir.path()) @@ -2731,7 +2789,8 @@ fn compile_html() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2743,7 +2802,7 @@ fn compile_html() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] jinja2==3.1.2 markupsafe==2.1.3 # via jinja2 @@ -2770,7 +2829,8 @@ fn trailing_slash() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2784,7 +2844,7 @@ fn trailing_slash() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] jinja2==3.1.2 markupsafe==2.1.3 # via jinja2 @@ -2798,7 +2858,8 @@ fn trailing_slash() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2812,7 +2873,7 @@ fn trailing_slash() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] jinja2==3.1.2 markupsafe==2.1.3 # via jinja2 @@ -2839,7 +2900,8 @@ fn compile_legacy_sdist_pep_517() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2851,7 +2913,7 @@ fn compile_legacy_sdist_pep_517() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --cache-dir [CACHE_DIR] flake8 @ https://files.pythonhosted.org/packages/66/53/3ad4a3b74d609b3b9008a10075c40e7c8909eae60af53623c3888f7a529a/flake8-6.0.0.tar.gz mccabe==0.7.0 # via flake8 @@ -2882,7 +2944,8 @@ fn compile_legacy_sdist_setuptools() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--legacy-setup-py") .arg("--cache-dir") @@ -2895,7 +2958,7 @@ fn compile_legacy_sdist_setuptools() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --legacy-setup-py --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --legacy-setup-py --cache-dir [CACHE_DIR] flake8 @ https://files.pythonhosted.org/packages/66/53/3ad4a3b74d609b3b9008a10075c40e7c8909eae60af53623c3888f7a529a/flake8-6.0.0.tar.gz mccabe==0.7.0 # via flake8 @@ -2926,7 +2989,8 @@ fn generate_hashes() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--generate-hashes") .arg("--cache-dir") @@ -2939,7 +3003,7 @@ fn generate_hashes() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --generate-hashes --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --generate-hashes --cache-dir [CACHE_DIR] blinker==1.7.0 \ --hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \ --hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182 @@ -3060,7 +3124,8 @@ fn find_links_directory() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--find-links") .arg(project_root.join("scripts/wheels/")) @@ -3074,7 +3139,7 @@ fn find_links_directory() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --find-links [PROJECT_ROOT]/scripts/wheels/ --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --find-links [PROJECT_ROOT]/scripts/wheels/ --cache-dir [CACHE_DIR] markupsafe==2.1.3 # via werkzeug numpy==1.26.2 @@ -3103,7 +3168,8 @@ fn find_links_url() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-compile") + .arg("pip") + .arg("compile") .arg("requirements.in") .arg("--no-index") .arg("--find-links") @@ -3118,7 +3184,7 @@ fn find_links_url() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by Puffin v0.0.1 via the following command: - # puffin pip-compile requirements.in --no-index --find-links https://download.pytorch.org/whl/torch_stable.html --cache-dir [CACHE_DIR] + # puffin pip compile requirements.in --no-index --find-links https://download.pytorch.org/whl/torch_stable.html --cache-dir [CACHE_DIR] tqdm==4.64.1 ----- stderr ----- diff --git a/crates/puffin-cli/tests/pip_install.rs b/crates/puffin-cli/tests/pip_install.rs index 0de276c85..90655d674 100644 --- a/crates/puffin-cli/tests/pip_install.rs +++ b/crates/puffin-cli/tests/pip_install.rs @@ -33,7 +33,8 @@ fn missing_requirements_txt() -> Result<()> { let requirements_txt = temp_dir.child("requirements.txt"); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -61,7 +62,8 @@ fn no_solution() -> Result<()> { let venv = create_venv_py312(&temp_dir, &cache_dir); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("flask>=3.0.0") .arg("WerkZeug<1.0.0") .arg("--strict") @@ -99,7 +101,8 @@ fn install_package() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("Flask") .arg("--strict") .arg("--cache-dir") @@ -146,7 +149,8 @@ fn install_requirements_txt() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -184,7 +188,8 @@ fn install_requirements_txt() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -224,7 +229,8 @@ fn respect_installed() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -263,7 +269,8 @@ fn respect_installed() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -293,7 +300,8 @@ fn respect_installed() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -325,7 +333,8 @@ fn respect_installed() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--reinstall-package") @@ -369,7 +378,8 @@ fn allow_incompatibilities() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -408,7 +418,8 @@ fn allow_incompatibilities() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-r") .arg("requirements.txt") .arg("--strict") @@ -457,7 +468,8 @@ fn install_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-e") .arg("../../scripts/editable-installs/poetry_editable") .arg("--strict") @@ -486,7 +498,8 @@ fn install_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-e") .arg("../../scripts/editable-installs/poetry_editable") .arg("--strict") @@ -510,7 +523,8 @@ fn install_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-e") .arg("../../scripts/editable-installs/poetry_editable") .arg("black") @@ -562,7 +576,8 @@ fn install_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("black") .arg("--strict") .arg("--cache-dir") @@ -593,7 +608,8 @@ fn install_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("-e") .arg("../../scripts/editable-installs/black_editable") .arg("--strict") @@ -622,7 +638,8 @@ fn install_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("black") .arg("--strict") .arg("--cache-dir") @@ -645,7 +662,8 @@ fn install_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("black==23.10.0") .arg("--strict") .arg("--cache-dir") diff --git a/crates/puffin-cli/tests/pip_install_scenarios.rs b/crates/puffin-cli/tests/pip_install_scenarios.rs index d278c80d1..2b542f1ef 100644 --- a/crates/puffin-cli/tests/pip_install_scenarios.rs +++ b/crates/puffin-cli/tests/pip_install_scenarios.rs @@ -64,7 +64,8 @@ fn requires_package_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s57cd4136-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -113,7 +114,8 @@ fn requires_exact_version_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("seaa03067-a==2.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -165,7 +167,8 @@ fn requires_greater_version_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s6e8e01df-a>1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -218,7 +221,8 @@ fn requires_less_version_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("se45cec3c-a<2.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -270,7 +274,8 @@ fn transitive_requires_package_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("saca2796a-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -320,7 +325,8 @@ fn excluded_only_version() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s7a9ed79c-a!=1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -393,7 +399,8 @@ fn excluded_only_compatible_version() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sd28c9e3c-a!=2.0.0") .arg("sd28c9e3c-b>=2.0.0,<3.0.0") .arg("--extra-index-url") @@ -503,7 +510,8 @@ fn dependency_excludes_range_of_compatible_versions() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s2023222f-a") .arg("s2023222f-b>=2.0.0,<3.0.0") .arg("s2023222f-c") @@ -642,7 +650,8 @@ fn dependency_excludes_non_contiguous_range_of_compatible_versions() -> Result<( filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("saece4208-a") .arg("saece4208-b>=2.0.0,<3.0.0") .arg("saece4208-c") @@ -720,7 +729,8 @@ fn direct_incompatible_versions() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s80d82ee8-a==1.0.0") .arg("s80d82ee8-a==2.0.0") .arg("--extra-index-url") @@ -780,7 +790,8 @@ fn transitive_incompatible_with_root_version() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sa967e815-a") .arg("sa967e815-b==1.0.0") .arg("--extra-index-url") @@ -848,7 +859,8 @@ fn transitive_incompatible_with_transitive() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s6866d8dc-a") .arg("s6866d8dc-b") .arg("--extra-index-url") @@ -909,7 +921,8 @@ fn package_only_prereleases() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s9a1b3dda-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -965,7 +978,8 @@ fn package_only_prereleases_in_range() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s19673198-a>0.1.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1022,7 +1036,8 @@ fn requires_package_only_prereleases_in_range_global_opt_in() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s51f94da2-a>0.1.0") .arg("--prerelease=allow") .arg("--extra-index-url") @@ -1077,7 +1092,8 @@ fn requires_package_prerelease_and_final_any() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("seebe53a6-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1136,7 +1152,8 @@ fn package_prerelease_specified_only_final_available() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s9d4725eb-a>=0.1.0a1") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1194,7 +1211,8 @@ fn package_prerelease_specified_only_prerelease_available() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s6cc95bc8-a>=0.1.0a1") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1254,7 +1272,8 @@ fn package_prerelease_specified_mixed_available() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sc97845e2-a>=0.1.0a1") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1313,7 +1332,8 @@ fn package_multiple_prereleases_kinds() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("se290bf29-a>=1.0.0a1") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1370,7 +1390,8 @@ fn package_multiple_prereleases_numbers() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sf5948c28-a>=1.0.0a1") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1428,7 +1449,8 @@ fn transitive_package_only_prereleases() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s44ebef16-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1490,7 +1512,8 @@ fn transitive_package_only_prereleases_in_range() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s27759187-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -1558,7 +1581,8 @@ fn transitive_package_only_prereleases_in_range_opt_in() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s26efb6c5-a") .arg("s26efb6c5-b>0.0.0a1") .arg("--extra-index-url") @@ -1627,7 +1651,8 @@ fn transitive_prerelease_and_stable_dependency() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sc7ad0310-a") .arg("sc7ad0310-b") .arg("--extra-index-url") @@ -1702,7 +1727,8 @@ fn transitive_prerelease_and_stable_dependency_opt_in() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sa05f7cb8-a") .arg("sa05f7cb8-b") .arg("sa05f7cb8-c>=0.0.0a1") @@ -1798,7 +1824,8 @@ fn transitive_prerelease_and_stable_dependency_many_versions() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s02ae765c-a") .arg("s02ae765c-b") .arg("--extra-index-url") @@ -1892,7 +1919,8 @@ fn transitive_prerelease_and_stable_dependency_many_versions_holes() -> Result<( filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sef9ce80f-a") .arg("sef9ce80f-b") .arg("--extra-index-url") @@ -1964,7 +1992,8 @@ fn requires_python_version_does_not_exist() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s0825b69c-a==1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2017,7 +2046,8 @@ fn requires_python_version_less_than_current() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sf9296b84-a==1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2070,7 +2100,8 @@ fn requires_python_version_greater_than_current() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sa11d5394-a==1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2145,7 +2176,8 @@ fn requires_python_version_greater_than_current_many() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s02dc550c-a==1.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2205,7 +2237,8 @@ fn requires_python_version_greater_than_current_backtrack() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("sef060cef-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2266,7 +2299,8 @@ fn requires_python_version_greater_than_current_excluded() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s1bde0c18-a>=2.0.0") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2333,7 +2367,8 @@ fn specific_tag_and_default() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s74e4a459-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2383,7 +2418,8 @@ fn only_wheels() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s4f019491-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2433,7 +2469,8 @@ fn no_wheels() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s614d801c-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") @@ -2483,7 +2520,8 @@ fn no_wheels_with_matching_platform() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") .arg("s737bbfd4-a") .arg("--extra-index-url") .arg("https://test.pypi.org/simple") diff --git a/crates/puffin-cli/tests/pip_sync.rs b/crates/puffin-cli/tests/pip_sync.rs index c2c91b1f5..a5230a836 100644 --- a/crates/puffin-cli/tests/pip_sync.rs +++ b/crates/puffin-cli/tests/pip_sync.rs @@ -34,7 +34,8 @@ fn missing_requirements_txt() -> Result<()> { let requirements_txt = temp_dir.child("requirements.txt"); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -61,7 +62,8 @@ fn missing_venv() -> Result<()> { let venv = temp_dir.child(".venv"); assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -98,7 +100,8 @@ fn install() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -137,7 +140,8 @@ fn install_copy() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--link-mode") .arg("copy") @@ -178,7 +182,8 @@ fn install_hardlink() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--link-mode") .arg("hardlink") @@ -219,7 +224,8 @@ fn install_many() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -256,7 +262,8 @@ fn noop() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -270,7 +277,8 @@ fn noop() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -304,7 +312,8 @@ fn link() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -331,7 +340,8 @@ fn link() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -366,7 +376,8 @@ fn add_remove() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -384,7 +395,8 @@ fn add_remove() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -430,7 +442,8 @@ fn install_sequential() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -448,7 +461,8 @@ fn install_sequential() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -485,7 +499,8 @@ fn upgrade() -> Result<()> { requirements_txt.write_str("tomli==2.0.0")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -503,7 +518,8 @@ fn upgrade() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -546,7 +562,8 @@ fn install_url() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -588,7 +605,8 @@ fn install_git_commit() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -630,7 +648,8 @@ fn install_git_tag() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -672,7 +691,8 @@ fn install_git_subdirectories() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -716,7 +736,8 @@ fn install_sdist() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -757,7 +778,8 @@ fn install_sdist_url() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -794,7 +816,8 @@ fn install_url_then_install_url() -> Result<()> { requirements_txt.write_str("werkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -810,7 +833,8 @@ fn install_url_then_install_url() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -844,7 +868,8 @@ fn install_url_then_install_version() -> Result<()> { requirements_txt.write_str("werkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -864,7 +889,8 @@ fn install_url_then_install_version() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -898,7 +924,8 @@ fn install_version_then_install_url() -> Result<()> { requirements_txt.write_str("werkzeug==2.0.0")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -918,7 +945,8 @@ fn install_version_then_install_url() -> Result<()> { ] }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -973,7 +1001,8 @@ fn install_numpy_py38() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1013,7 +1042,8 @@ fn warn_on_yanked_version() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1061,7 +1091,8 @@ fn install_local_wheel() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1110,7 +1141,8 @@ fn install_local_source_distribution() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1157,7 +1189,8 @@ fn install_ujson() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1207,7 +1240,8 @@ fn install_build_system_no_backend() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1246,7 +1280,8 @@ fn install_url_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1275,7 +1310,8 @@ fn install_url_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1321,7 +1357,8 @@ fn install_url_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1361,7 +1398,8 @@ fn install_git_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1390,7 +1428,8 @@ fn install_git_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1436,7 +1475,8 @@ fn install_git_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1475,7 +1515,8 @@ fn install_registry_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1504,7 +1545,8 @@ fn install_registry_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1550,7 +1592,8 @@ fn install_registry_source_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1599,7 +1642,8 @@ fn install_path_source_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1628,7 +1672,8 @@ fn install_path_source_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1674,7 +1719,8 @@ fn install_path_source_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1723,7 +1769,8 @@ fn install_path_built_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1752,7 +1799,8 @@ fn install_path_built_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1798,7 +1846,8 @@ fn install_path_built_dist_cached() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1837,7 +1886,8 @@ fn install_url_built_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1866,7 +1916,8 @@ fn install_url_built_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1912,7 +1963,8 @@ fn install_url_built_dist_cached() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1951,7 +2003,8 @@ fn duplicate_package_overlap() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -1986,7 +2039,8 @@ fn duplicate_package_disjoint() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -2023,7 +2077,8 @@ fn reinstall() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -2051,7 +2106,8 @@ fn reinstall() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--reinstall") .arg("--strict") @@ -2096,7 +2152,8 @@ fn reinstall_package() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -2124,7 +2181,8 @@ fn reinstall_package() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--reinstall-package") .arg("tomli") @@ -2169,7 +2227,8 @@ fn reinstall_git() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -2195,7 +2254,8 @@ fn reinstall_git() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--reinstall-package") .arg("WerkZeug") @@ -2263,7 +2323,8 @@ fn sync_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2291,7 +2352,8 @@ fn sync_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--reinstall-package") .arg("poetry-editable") @@ -2355,7 +2417,8 @@ fn sync_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2403,7 +2466,8 @@ fn sync_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2448,7 +2512,8 @@ fn sync_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2489,7 +2554,8 @@ fn sync_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2525,7 +2591,8 @@ fn sync_editable_and_registry() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--strict") .arg("--cache-dir") @@ -2576,7 +2643,8 @@ fn incompatible_wheel() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--strict") .arg("--cache-dir") @@ -2610,7 +2678,8 @@ fn sync_legacy_sdist_pep_517() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.in") .arg("--cache-dir") .arg(cache_dir.path()) @@ -2645,7 +2714,8 @@ fn sync_legacy_sdist_setuptools() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.in") .arg("--legacy-setup-py") .arg("--cache-dir") @@ -2692,7 +2762,8 @@ fn find_links() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--find-links") .arg(project_root.join("scripts/wheels/")) diff --git a/crates/puffin-cli/tests/pip_uninstall.rs b/crates/puffin-cli/tests/pip_uninstall.rs index de427b70a..d8b033669 100644 --- a/crates/puffin-cli/tests/pip_uninstall.rs +++ b/crates/puffin-cli/tests/pip_uninstall.rs @@ -17,7 +17,8 @@ fn no_arguments() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .current_dir(&temp_dir), @r###" success: false exit_code: 2 @@ -27,7 +28,7 @@ fn no_arguments() -> Result<()> { error: the following required arguments were not provided: |--editable > - Usage: puffin pip-uninstall |--editable > + Usage: puffin pip uninstall |--editable > For more information, try '--help'. "###); @@ -40,7 +41,8 @@ fn invalid_requirement() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("flask==1.0.x") .current_dir(&temp_dir), @r###" success: false @@ -62,7 +64,8 @@ fn missing_requirements_txt() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("requirements.txt") .current_dir(&temp_dir), @r###" @@ -86,7 +89,8 @@ fn invalid_requirements_txt_requirement() -> Result<()> { requirements_txt.write_str("flask==1.0.x")?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("requirements.txt") .current_dir(&temp_dir), @r###" @@ -109,7 +113,8 @@ fn missing_pyproject_toml() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("pyproject.toml") .current_dir(&temp_dir), @r###" @@ -133,7 +138,8 @@ fn invalid_pyproject_toml_syntax() -> Result<()> { pyproject_toml.write_str("123 - 456")?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("pyproject.toml") .current_dir(&temp_dir), @r###" @@ -162,7 +168,8 @@ fn invalid_pyproject_toml_schema() -> Result<()> { pyproject_toml.write_str("[project]")?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("pyproject.toml") .current_dir(&temp_dir), @r###" @@ -196,7 +203,8 @@ dependencies = ["flask==1.0.x"] )?; assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-r") .arg("pyproject.toml") .current_dir(&temp_dir), @r###" @@ -230,7 +238,8 @@ fn uninstall() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--cache-dir") .arg(cache_dir.path()) @@ -250,7 +259,8 @@ fn uninstall() -> Result<()> { filters => INSTA_FILTERS.to_vec() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("MarkupSafe") .arg("--cache-dir") .arg(cache_dir.path()) @@ -287,7 +297,8 @@ fn missing_record() -> Result<()> { requirements_txt.write_str("MarkupSafe==2.1.3")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg("requirements.txt") .arg("--cache-dir") .arg(cache_dir.path()) @@ -322,7 +333,8 @@ fn missing_record() -> Result<()> { filters => filters, }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("MarkupSafe") .arg("--cache-dir") .arg(cache_dir.path()) @@ -358,7 +370,8 @@ fn uninstall_editable_by_name() -> Result<()> { requirements_txt.write_str("-e ../../scripts/editable-installs/poetry_editable")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--cache-dir") .arg(cache_dir.path()) @@ -377,7 +390,8 @@ fn uninstall_editable_by_name() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("poetry-editable") .arg("--cache-dir") .arg(cache_dir.path()) @@ -420,7 +434,8 @@ fn uninstall_editable_by_path() -> Result<()> { requirements_txt.write_str("-e ../../scripts/editable-installs/poetry_editable")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--cache-dir") .arg(cache_dir.path()) @@ -439,7 +454,8 @@ fn uninstall_editable_by_path() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("-e") .arg("../../scripts/editable-installs/poetry_editable") .arg("--cache-dir") @@ -482,7 +498,8 @@ fn uninstall_duplicate_editable() -> Result<()> { requirements_txt.write_str("-e ../../scripts/editable-installs/poetry_editable")?; Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-sync") + .arg("pip") + .arg("sync") .arg(requirements_txt.path()) .arg("--cache-dir") .arg(cache_dir.path()) @@ -501,7 +518,8 @@ fn uninstall_duplicate_editable() -> Result<()> { filters => filters.clone() }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-uninstall") + .arg("pip") + .arg("uninstall") .arg("poetry-editable") .arg("-e") .arg("../../scripts/editable-installs/poetry_editable") diff --git a/scripts/bench/__main__.py b/scripts/bench/__main__.py index 1b370dddc..e7d6ffa92 100644 --- a/scripts/bench/__main__.py +++ b/scripts/bench/__main__.py @@ -10,7 +10,7 @@ To set up the required environment, run: cargo build --release ./target/release/puffin venv - ./target/release/puffin pip-sync ./scripts/bench/requirements.txt + ./target/release/puffin pip sync ./scripts/bench/requirements.txt source .venv/bin/activate Example usage: @@ -453,7 +453,8 @@ class Puffin(Suite): prepare=f"rm -rf {cwd} && rm -f {output_file}", command=[ self.path, - "pip-compile", + "pip", + "compile", os.path.abspath(requirements_file), "--cache-dir", cache_dir, @@ -471,7 +472,8 @@ class Puffin(Suite): prepare=f"rm -f {output_file}", command=[ self.path, - "pip-compile", + "pip", + "compile", os.path.abspath(requirements_file), "--cache-dir", cache_dir, @@ -490,7 +492,8 @@ class Puffin(Suite): command=[ f"VIRTUAL_ENV={venv_dir}", self.path, - "pip-sync", + "pip", + "sync", os.path.abspath(requirements_file), "--cache-dir", cache_dir, @@ -507,7 +510,8 @@ class Puffin(Suite): command=[ f"VIRTUAL_ENV={venv_dir}", self.path, - "pip-sync", + "pip", + "sync", os.path.abspath(requirements_file), "--cache-dir", cache_dir, diff --git a/scripts/bench/requirements.txt b/scripts/bench/requirements.txt index d15598762..a0654ce35 100644 --- a/scripts/bench/requirements.txt +++ b/scripts/bench/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile ./scripts/requirements.in --python-version 3.10 +# puffin pip compile ./scripts/requirements.in --python-version 3.10 build==1.0.3 # via # pip-tools diff --git a/scripts/benchmarks/compile.sh b/scripts/benchmarks/compile.sh index 0d5cb530a..6a02d26d4 100755 --- a/scripts/benchmarks/compile.sh +++ b/scripts/benchmarks/compile.sh @@ -23,5 +23,5 @@ hyperfine --runs 20 --warmup 3 --prepare "rm -f /tmp/requirements.txt" \ # Resolution with a warm cache. ### hyperfine --runs 20 --warmup 3 --prepare "rm -f /tmp/requirements.txt" \ - "./target/release/puffin pip-compile ${TARGET} > /tmp/requirements.txt" \ + "./target/release/puffin pip compile ${TARGET} > /tmp/requirements.txt" \ "./target/release/main pip-compile ${TARGET} > /tmp/requirements.txt" diff --git a/scripts/benchmarks/sync.sh b/scripts/benchmarks/sync.sh index a7716bedb..e39883be1 100755 --- a/scripts/benchmarks/sync.sh +++ b/scripts/benchmarks/sync.sh @@ -17,7 +17,7 @@ TARGET=${1} ### hyperfine --runs 20 --warmup 3 \ --prepare "virtualenv --clear .venv" \ - "./target/release/puffin pip-sync ${TARGET} --no-cache" \ + "./target/release/puffin pip sync ${TARGET} --no-cache" \ --prepare "rm -rf /tmp/site-packages" \ "pip install -r ${TARGET} --target /tmp/site-packages --no-cache-dir --no-deps" @@ -26,7 +26,7 @@ hyperfine --runs 20 --warmup 3 \ ### hyperfine --runs 20 --warmup 3 \ --prepare "virtualenv --clear .venv" \ - "./target/release/puffin pip-sync ${TARGET}" \ + "./target/release/puffin pip sync ${TARGET}" \ --prepare "rm -rf /tmp/site-packages" \ "pip install -r ${TARGET} --target /tmp/site-packages --no-deps" @@ -35,5 +35,5 @@ hyperfine --runs 20 --warmup 3 \ ### hyperfine --runs 20 --warmup 3 \ --setup "virtualenv --clear .venv && source .venv/bin/activate" \ - "./target/release/puffin pip-sync ${TARGET}" \ + "./target/release/puffin pip sync ${TARGET}" \ "pip install -r ${TARGET} --no-deps" diff --git a/scripts/requirements/compiled/all-kinds.txt b/scripts/requirements/compiled/all-kinds.txt index 1e54bff2f..ae9db6500 100644 --- a/scripts/requirements/compiled/all-kinds.txt +++ b/scripts/requirements/compiled/all-kinds.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/all-kinds.in +# puffin pip compile scripts/requirements/all-kinds.in annotated-types==0.6.0 # via pydantic asgiref==3.7.2 diff --git a/scripts/requirements/compiled/black.txt b/scripts/requirements/compiled/black.txt index b4c49abf0..7e0091fb0 100644 --- a/scripts/requirements/compiled/black.txt +++ b/scripts/requirements/compiled/black.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/black.in +# puffin pip compile scripts/requirements/black.in black==23.12.1 click==8.1.7 # via black diff --git a/scripts/requirements/compiled/boto3.txt b/scripts/requirements/compiled/boto3.txt index dd6e33d18..9ce07d4b6 100644 --- a/scripts/requirements/compiled/boto3.txt +++ b/scripts/requirements/compiled/boto3.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/boto3.in +# puffin pip compile scripts/requirements/boto3.in boto3==1.7.84 botocore==1.10.84 # via diff --git a/scripts/requirements/compiled/dtlssocket.txt b/scripts/requirements/compiled/dtlssocket.txt index a63dc1c8c..e60389c5c 100644 --- a/scripts/requirements/compiled/dtlssocket.txt +++ b/scripts/requirements/compiled/dtlssocket.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/dtlssocket.in +# puffin pip compile scripts/requirements/dtlssocket.in cython==0.29.37 # via dtlssocket dtlssocket==0.1.16 diff --git a/scripts/requirements/compiled/flyte.txt b/scripts/requirements/compiled/flyte.txt index 7ac4a160a..070861807 100644 --- a/scripts/requirements/compiled/flyte.txt +++ b/scripts/requirements/compiled/flyte.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/flyte.in +# puffin pip compile scripts/requirements/flyte.in absl-py==2.0.0 # via # tensorboard diff --git a/scripts/requirements/compiled/pdm_2193.txt b/scripts/requirements/compiled/pdm_2193.txt index d5e77dca3..7b919684c 100644 --- a/scripts/requirements/compiled/pdm_2193.txt +++ b/scripts/requirements/compiled/pdm_2193.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/pdm_2193.in +# puffin pip compile scripts/requirements/pdm_2193.in certifi==2023.11.17 # via requests charset-normalizer==3.3.2 diff --git a/scripts/requirements/compiled/scispacy.txt b/scripts/requirements/compiled/scispacy.txt index d2022e010..6641dded4 100644 --- a/scripts/requirements/compiled/scispacy.txt +++ b/scripts/requirements/compiled/scispacy.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/scispacy.in +# puffin pip compile scripts/requirements/scispacy.in annotated-types==0.6.0 # via pydantic black==23.12.1 diff --git a/scripts/requirements/compiled/trio.txt b/scripts/requirements/compiled/trio.txt index 1e575ea91..baeb07396 100644 --- a/scripts/requirements/compiled/trio.txt +++ b/scripts/requirements/compiled/trio.txt @@ -1,5 +1,5 @@ # This file was autogenerated by Puffin v0.0.1 via the following command: -# puffin pip-compile scripts/requirements/trio.in +# puffin pip compile scripts/requirements/trio.in alabaster==0.7.15 # via sphinx attrs==23.2.0 diff --git a/scripts/scenarios/template.mustache b/scripts/scenarios/template.mustache index a9f01ef53..f9a836a38 100644 --- a/scripts/scenarios/template.mustache +++ b/scripts/scenarios/template.mustache @@ -73,7 +73,8 @@ fn {{normalized_name}}() -> Result<()> { filters => filters }, { assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME)) - .arg("pip-install") + .arg("pip") + .arg("install") {{#root.requires}} .arg("{{prefix}}-{{.}}") {{/root.requires}}