diff --git a/Cargo.lock b/Cargo.lock index 57e3bcad6781..602e5a74f3a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2253,56 +2253,7 @@ dependencies = [ ] [[package]] -name = "puffin-build" -version = "0.0.1" -dependencies = [ - "anyhow", - "distribution-types", - "fs-err", - "gourgeist", - "indoc", - "insta", - "itertools 0.12.0", - "once_cell", - "pep508_rs", - "platform-host", - "puffin-extract", - "puffin-fs", - "puffin-interpreter", - "puffin-traits", - "pypi-types", - "pyproject-toml", - "regex", - "serde", - "serde_json", - "tempfile", - "thiserror", - "tokio", - "toml", - "tracing", -] - -[[package]] -name = "puffin-cache" -version = "0.0.1" -dependencies = [ - "cache-key", - "cachedir", - "clap", - "directories", - "distribution-types", - "fs-err", - "puffin-fs", - "puffin-normalize", - "pypi-types", - "serde", - "tempfile", - "tracing", - "url", -] - -[[package]] -name = "puffin-cli" +name = "puffin" version = "0.0.1" dependencies = [ "anstream", @@ -2364,6 +2315,55 @@ dependencies = [ "which", ] +[[package]] +name = "puffin-build" +version = "0.0.1" +dependencies = [ + "anyhow", + "distribution-types", + "fs-err", + "gourgeist", + "indoc", + "insta", + "itertools 0.12.0", + "once_cell", + "pep508_rs", + "platform-host", + "puffin-extract", + "puffin-fs", + "puffin-interpreter", + "puffin-traits", + "pypi-types", + "pyproject-toml", + "regex", + "serde", + "serde_json", + "tempfile", + "thiserror", + "tokio", + "toml", + "tracing", +] + +[[package]] +name = "puffin-cache" +version = "0.0.1" +dependencies = [ + "cache-key", + "cachedir", + "clap", + "directories", + "distribution-types", + "fs-err", + "puffin-fs", + "puffin-normalize", + "pypi-types", + "serde", + "tempfile", + "tracing", + "url", +] + [[package]] name = "puffin-client" version = "0.0.1" diff --git a/crates/README.md b/crates/README.md index 8b086457bcc9..44738e8e4e10 100644 --- a/crates/README.md +++ b/crates/README.md @@ -47,6 +47,10 @@ Functionality for detecting the current platform (operating system, architecture Functionality for parsing and inferring Python platform tags as per [PEP 425](https://peps.python.org/pep-0425/). +## [puffin](./puffin) + +Command-line interface for the Puffin package manager. + ## [puffin-build](./puffin-build) A [PEP 517](https://www.python.org/dev/peps/pep-0517/)-compatible build frontend for Puffin. @@ -55,10 +59,6 @@ A [PEP 517](https://www.python.org/dev/peps/pep-0517/)-compatible build frontend Functionality for caching Python packages and associated metadata. -## [puffin-cli](./puffin-cli) - -Command-line interface for the Puffin package manager. - ## [puffin-client](./puffin-client) Client for interacting with PyPI-compatible HTTP APIs. diff --git a/crates/puffin-traits/src/lib.rs b/crates/puffin-traits/src/lib.rs index 0641e33b1871..ebef0c95fa12 100644 --- a/crates/puffin-traits/src/lib.rs +++ b/crates/puffin-traits/src/lib.rs @@ -27,7 +27,7 @@ use puffin_interpreter::{Interpreter, Virtualenv}; /// /// ```text /// ┌────────────────┐ -/// │puffin-cli │ +/// │puffin │ /// └───────▲────────┘ /// │ /// │ diff --git a/crates/puffin-cli/Cargo.toml b/crates/puffin/Cargo.toml similarity index 98% rename from crates/puffin-cli/Cargo.toml rename to crates/puffin/Cargo.toml index b54da966088f..f6af70331143 100644 --- a/crates/puffin-cli/Cargo.toml +++ b/crates/puffin/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "puffin-cli" +name = "puffin" version = "0.0.1" edition = { workspace = true } rust-version = { workspace = true } @@ -13,10 +13,6 @@ default-run = "puffin" [lints] workspace = true -[[bin]] -name = "puffin" -path = "src/main.rs" - [dependencies] distribution-filename = { path = "../distribution-filename" } distribution-types = { path = "../distribution-types" } diff --git a/crates/puffin-cli/src/commands/add.rs b/crates/puffin/src/commands/add.rs similarity index 100% rename from crates/puffin-cli/src/commands/add.rs rename to crates/puffin/src/commands/add.rs diff --git a/crates/puffin-cli/src/commands/clean.rs b/crates/puffin/src/commands/clean.rs similarity index 100% rename from crates/puffin-cli/src/commands/clean.rs rename to crates/puffin/src/commands/clean.rs diff --git a/crates/puffin-cli/src/commands/freeze.rs b/crates/puffin/src/commands/freeze.rs similarity index 100% rename from crates/puffin-cli/src/commands/freeze.rs rename to crates/puffin/src/commands/freeze.rs diff --git a/crates/puffin-cli/src/commands/mod.rs b/crates/puffin/src/commands/mod.rs similarity index 100% rename from crates/puffin-cli/src/commands/mod.rs rename to crates/puffin/src/commands/mod.rs diff --git a/crates/puffin-cli/src/commands/pip_compile.rs b/crates/puffin/src/commands/pip_compile.rs similarity index 100% rename from crates/puffin-cli/src/commands/pip_compile.rs rename to crates/puffin/src/commands/pip_compile.rs diff --git a/crates/puffin-cli/src/commands/pip_install.rs b/crates/puffin/src/commands/pip_install.rs similarity index 100% rename from crates/puffin-cli/src/commands/pip_install.rs rename to crates/puffin/src/commands/pip_install.rs diff --git a/crates/puffin-cli/src/commands/pip_sync.rs b/crates/puffin/src/commands/pip_sync.rs similarity index 100% rename from crates/puffin-cli/src/commands/pip_sync.rs rename to crates/puffin/src/commands/pip_sync.rs diff --git a/crates/puffin-cli/src/commands/pip_uninstall.rs b/crates/puffin/src/commands/pip_uninstall.rs similarity index 100% rename from crates/puffin-cli/src/commands/pip_uninstall.rs rename to crates/puffin/src/commands/pip_uninstall.rs diff --git a/crates/puffin-cli/src/commands/remove.rs b/crates/puffin/src/commands/remove.rs similarity index 100% rename from crates/puffin-cli/src/commands/remove.rs rename to crates/puffin/src/commands/remove.rs diff --git a/crates/puffin-cli/src/commands/reporters.rs b/crates/puffin/src/commands/reporters.rs similarity index 100% rename from crates/puffin-cli/src/commands/reporters.rs rename to crates/puffin/src/commands/reporters.rs diff --git a/crates/puffin-cli/src/commands/venv.rs b/crates/puffin/src/commands/venv.rs similarity index 100% rename from crates/puffin-cli/src/commands/venv.rs rename to crates/puffin/src/commands/venv.rs diff --git a/crates/puffin-cli/src/logging.rs b/crates/puffin/src/logging.rs similarity index 100% rename from crates/puffin-cli/src/logging.rs rename to crates/puffin/src/logging.rs diff --git a/crates/puffin-cli/src/main.rs b/crates/puffin/src/main.rs similarity index 100% rename from crates/puffin-cli/src/main.rs rename to crates/puffin/src/main.rs diff --git a/crates/puffin-cli/src/printer.rs b/crates/puffin/src/printer.rs similarity index 100% rename from crates/puffin-cli/src/printer.rs rename to crates/puffin/src/printer.rs diff --git a/crates/puffin-cli/src/requirements.rs b/crates/puffin/src/requirements.rs similarity index 100% rename from crates/puffin-cli/src/requirements.rs rename to crates/puffin/src/requirements.rs diff --git a/crates/puffin-cli/tests/add.rs b/crates/puffin/tests/add.rs similarity index 100% rename from crates/puffin-cli/tests/add.rs rename to crates/puffin/tests/add.rs diff --git a/crates/puffin-cli/tests/common/mod.rs b/crates/puffin/tests/common/mod.rs similarity index 100% rename from crates/puffin-cli/tests/common/mod.rs rename to crates/puffin/tests/common/mod.rs diff --git a/crates/puffin-cli/tests/pip_compile.rs b/crates/puffin/tests/pip_compile.rs similarity index 100% rename from crates/puffin-cli/tests/pip_compile.rs rename to crates/puffin/tests/pip_compile.rs diff --git a/crates/puffin-cli/tests/pip_install.rs b/crates/puffin/tests/pip_install.rs similarity index 100% rename from crates/puffin-cli/tests/pip_install.rs rename to crates/puffin/tests/pip_install.rs diff --git a/crates/puffin-cli/tests/pip_install_scenarios.rs b/crates/puffin/tests/pip_install_scenarios.rs similarity index 100% rename from crates/puffin-cli/tests/pip_install_scenarios.rs rename to crates/puffin/tests/pip_install_scenarios.rs diff --git a/crates/puffin-cli/tests/pip_sync.rs b/crates/puffin/tests/pip_sync.rs similarity index 100% rename from crates/puffin-cli/tests/pip_sync.rs rename to crates/puffin/tests/pip_sync.rs diff --git a/crates/puffin-cli/tests/pip_uninstall.rs b/crates/puffin/tests/pip_uninstall.rs similarity index 100% rename from crates/puffin-cli/tests/pip_uninstall.rs rename to crates/puffin/tests/pip_uninstall.rs diff --git a/crates/puffin-cli/tests/remove.rs b/crates/puffin/tests/remove.rs similarity index 100% rename from crates/puffin-cli/tests/remove.rs rename to crates/puffin/tests/remove.rs diff --git a/crates/puffin-cli/tests/venv.rs b/crates/puffin/tests/venv.rs similarity index 100% rename from crates/puffin-cli/tests/venv.rs rename to crates/puffin/tests/venv.rs diff --git a/pyproject.toml b/pyproject.toml index 0e9872f54a9f..6809ed98d55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ Changelog = "https://pypi.org/project/puffin-alpha/" [tool.maturin] bindings = "bin" -manifest-path = "crates/puffin-cli/Cargo.toml" +manifest-path = "crates/puffin/Cargo.toml" module-name = "puffin" python-source = "python" strip = true diff --git a/scripts/benchmarks/uninstall.sh b/scripts/benchmarks/uninstall.sh index 0788f2116abd..f9f652cb6a9b 100755 --- a/scripts/benchmarks/uninstall.sh +++ b/scripts/benchmarks/uninstall.sh @@ -13,5 +13,5 @@ set -euxo pipefail TARGET=${1} hyperfine --runs 20 --warmup 3 --prepare "rm -rf .venv && virtualenv .venv && source activate .venv/bin/activate && pip install ${TARGET}" \ - "./target/release/puffin-cli uninstall ${TARGET}" \ + "./target/release/puffin uninstall ${TARGET}" \ "pip uninstall -y ${TARGET}" diff --git a/scripts/scenarios/update.py b/scripts/scenarios/update.py index 36379ad03d19..4209058d94f3 100755 --- a/scripts/scenarios/update.py +++ b/scripts/scenarios/update.py @@ -51,7 +51,7 @@ PACKSE = TOOL_ROOT / "packse-scenarios" REQUIREMENTS = TOOL_ROOT / "requirements.txt" PROJECT_ROOT = TOOL_ROOT.parent.parent -TARGET = PROJECT_ROOT / "crates" / "puffin-cli" / "tests" / "pip_install_scenarios.rs" +TARGET = PROJECT_ROOT / "crates" / "puffin" / "tests" / "pip_install_scenarios.rs" try: import packse