Rename `puffin-cli` crate to `puffin` (#976)

## Summary

Like in Ruff, this simplifies a few things.
This commit is contained in:
Charlie Marsh 2024-01-18 19:02:52 -05:00 committed by GitHub
parent 6cad0f609c
commit 5e2b715366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
31 changed files with 59 additions and 63 deletions

100
Cargo.lock generated
View File

@ -2253,56 +2253,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "puffin-build" name = "puffin"
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"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"anstream", "anstream",
@ -2364,6 +2315,55 @@ dependencies = [
"which", "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]] [[package]]
name = "puffin-client" name = "puffin-client"
version = "0.0.1" version = "0.0.1"

View File

@ -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/). 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) ## [puffin-build](./puffin-build)
A [PEP 517](https://www.python.org/dev/peps/pep-0517/)-compatible build frontend for Puffin. 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. Functionality for caching Python packages and associated metadata.
## [puffin-cli](./puffin-cli)
Command-line interface for the Puffin package manager.
## [puffin-client](./puffin-client) ## [puffin-client](./puffin-client)
Client for interacting with PyPI-compatible HTTP APIs. Client for interacting with PyPI-compatible HTTP APIs.

View File

@ -27,7 +27,7 @@ use puffin_interpreter::{Interpreter, Virtualenv};
/// ///
/// ```text /// ```text
/// ┌────────────────┐ /// ┌────────────────┐
/// │puffin-cli /// │puffin
/// └───────▲────────┘ /// └───────▲────────┘
/// │ /// │
/// │ /// │

View File

@ -1,5 +1,5 @@
[package] [package]
name = "puffin-cli" name = "puffin"
version = "0.0.1" version = "0.0.1"
edition = { workspace = true } edition = { workspace = true }
rust-version = { workspace = true } rust-version = { workspace = true }
@ -13,10 +13,6 @@ default-run = "puffin"
[lints] [lints]
workspace = true workspace = true
[[bin]]
name = "puffin"
path = "src/main.rs"
[dependencies] [dependencies]
distribution-filename = { path = "../distribution-filename" } distribution-filename = { path = "../distribution-filename" }
distribution-types = { path = "../distribution-types" } distribution-types = { path = "../distribution-types" }

View File

@ -18,7 +18,7 @@ Changelog = "https://pypi.org/project/puffin-alpha/"
[tool.maturin] [tool.maturin]
bindings = "bin" bindings = "bin"
manifest-path = "crates/puffin-cli/Cargo.toml" manifest-path = "crates/puffin/Cargo.toml"
module-name = "puffin" module-name = "puffin"
python-source = "python" python-source = "python"
strip = true strip = true

View File

@ -13,5 +13,5 @@ set -euxo pipefail
TARGET=${1} TARGET=${1}
hyperfine --runs 20 --warmup 3 --prepare "rm -rf .venv && virtualenv .venv && source activate .venv/bin/activate && pip install ${TARGET}" \ 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}" "pip uninstall -y ${TARGET}"

View File

@ -51,7 +51,7 @@ TEMPLATE = TOOL_ROOT / "template.mustache"
PACKSE = TOOL_ROOT / "packse-scenarios" PACKSE = TOOL_ROOT / "packse-scenarios"
REQUIREMENTS = TOOL_ROOT / "requirements.txt" REQUIREMENTS = TOOL_ROOT / "requirements.txt"
PROJECT_ROOT = TOOL_ROOT.parent.parent 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: try:
import packse import packse