Skip to content

Commit 0d455eb

Browse files
authored
Always use puffin as binary name (#435)
It doesn't matter how exactly the user called puffin, the lockfile should look the same either way.
1 parent 751f7fa commit 0d455eb

26 files changed

+71
-72
lines changed

crates/puffin-cli/src/commands/pip_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pub(crate) async fn pip_compile(
197197
writeln!(
198198
writer,
199199
"{}",
200-
format!("# {}", env::args().join(" ")).green()
200+
format!("# puffin {}", env::args().skip(1).join(" ")).green()
201201
)?;
202202
write!(writer, "{resolution}")?;
203203

crates/puffin-cli/tests/common/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ pub(crate) const BIN_NAME: &str = "puffin";
33
#[allow(dead_code)]
44
pub(crate) const INSTA_FILTERS: &[(&str, &str)] = &[
55
(r"(\d+\.)?\d+(ms|s)", "[TIME]"),
6-
(r"# .* pip-compile", "# [BIN_PATH] pip-compile"),
76
(r"--cache-dir .*", "--cache-dir [CACHE_DIR]"),
87
];

crates/puffin-cli/tests/pip_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ fn compile_numpy_py38() -> Result<()> {
542542
exit_code: 0
543543
----- stdout -----
544544
# This file was autogenerated by Puffin v0.0.1 via the following command:
545-
# [BIN_PATH] pip-compile requirements.in --cache-dir [CACHE_DIR]
545+
# puffin pip-compile requirements.in --cache-dir [CACHE_DIR]
546546
numpy==1.24.4
547547
548548
----- stderr -----

crates/puffin-cli/tests/snapshots/pip_compile__allowed_transitive_canonical_url_dependency.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ info:
88
- "--constraint"
99
- constraints.txt
1010
- "--cache-dir"
11-
- /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpb2n1p9
11+
- /tmp/.tmph9JKJb
1212
env:
13-
VIRTUAL_ENV: /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpAnFqUK/.venv
13+
VIRTUAL_ENV: /tmp/.tmplckqQ6/.venv
1414
---
1515
success: true
1616
exit_code: 0
1717
----- stdout -----
1818
# This file was autogenerated by Puffin v0.0.1 via the following command:
19-
# [BIN_PATH] pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
19+
# puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
2020
transitive-url-dependency @ https://github.com/astral-sh/ruff/files/13257454/transitive_url_dependency.zip
2121
werkzeug @ git+https://github.com/pallets/werkzeug@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74
2222
# via transitive-url-dependency

crates/puffin-cli/tests/snapshots/pip_compile__allowed_transitive_url_dependency.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ info:
88
- "--constraint"
99
- constraints.txt
1010
- "--cache-dir"
11-
- /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpUeMnec
11+
- /tmp/.tmpypxk3w
1212
env:
13-
VIRTUAL_ENV: /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpaClkf0/.venv
13+
VIRTUAL_ENV: /tmp/.tmpPRuGEQ/.venv
1414
---
1515
success: true
1616
exit_code: 0
1717
----- stdout -----
1818
# This file was autogenerated by Puffin v0.0.1 via the following command:
19-
# [BIN_PATH] pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
19+
# puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
2020
transitive-url-dependency @ https://github.com/astral-sh/ruff/files/13257454/transitive_url_dependency.zip
2121
werkzeug @ git+https://github.com/pallets/werkzeug@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74
2222
# via transitive-url-dependency

crates/puffin-cli/tests/snapshots/pip_compile__compatible_direct_url_dependency.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ info:
66
- pip-compile
77
- requirements.in
88
- "--cache-dir"
9-
- /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmp5pOmCe
9+
- /tmp/.tmpBgzY3j
1010
env:
11-
VIRTUAL_ENV: /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpMF1dXI/.venv
11+
VIRTUAL_ENV: /tmp/.tmpPNv6ia/.venv
1212
---
1313
success: true
1414
exit_code: 0
1515
----- stdout -----
1616
# This file was autogenerated by Puffin v0.0.1 via the following command:
17-
# [BIN_PATH] pip-compile requirements.in --cache-dir [CACHE_DIR]
17+
# puffin pip-compile requirements.in --cache-dir [CACHE_DIR]
1818
werkzeug @ https://files.pythonhosted.org/packages/ff/1d/960bb4017c68674a1cb099534840f18d3def3ce44aed12b5ed8b78e0153e/Werkzeug-2.0.0-py3-none-any.whl
1919

2020
----- stderr -----

crates/puffin-cli/tests/snapshots/pip_compile__compile_constraints_inline.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ info:
66
- pip-compile
77
- requirements.in
88
- "--cache-dir"
9-
- /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmp5R6H5M
9+
- /tmp/.tmpdbA70i
1010
env:
11-
VIRTUAL_ENV: /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpIdL1TH/.venv
11+
VIRTUAL_ENV: /tmp/.tmp3iTWTb/.venv
1212
---
1313
success: true
1414
exit_code: 0
1515
----- stdout -----
1616
# This file was autogenerated by Puffin v0.0.1 via the following command:
17-
# [BIN_PATH] pip-compile requirements.in --cache-dir [CACHE_DIR]
17+
# puffin pip-compile requirements.in --cache-dir [CACHE_DIR]
1818

1919
----- stderr -----
2020
Resolved 0 packages in [TIME]

crates/puffin-cli/tests/snapshots/pip_compile__compile_constraints_markers.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ info:
88
- "--constraint"
99
- constraints.txt
1010
- "--cache-dir"
11-
- /tmp/.tmp81zzAa
11+
- /tmp/.tmpZMtiDp
1212
env:
13-
VIRTUAL_ENV: /tmp/.tmpFXMFLd/.venv
13+
VIRTUAL_ENV: /tmp/.tmpYzlRGF/.venv
1414
---
1515
success: true
1616
exit_code: 0
1717
----- stdout -----
1818
# This file was autogenerated by Puffin v0.0.1 via the following command:
19-
# [BIN_PATH] pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
19+
# puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
2020
anyio==4.0.0
2121
idna==3.4
2222
# via anyio

crates/puffin-cli/tests/snapshots/pip_compile__compile_constraints_txt.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ info:
88
- "--constraint"
99
- constraints.txt
1010
- "--cache-dir"
11-
- /tmp/.tmpuS4Jn4
11+
- /tmp/.tmpqKe52b
1212
env:
13-
VIRTUAL_ENV: /tmp/.tmpnFovuD/.venv
13+
VIRTUAL_ENV: /tmp/.tmpUeuA4H/.venv
1414
---
1515
success: true
1616
exit_code: 0
1717
----- stdout -----
1818
# This file was autogenerated by Puffin v0.0.1 via the following command:
19-
# [BIN_PATH] pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
19+
# puffin pip-compile requirements.in --constraint constraints.txt --cache-dir [CACHE_DIR]
2020
asgiref==3.7.2
2121
# via django
2222
django==5.0b1

crates/puffin-cli/tests/snapshots/pip_compile__compile_git_branch_https_dependency.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ info:
66
- pip-compile
77
- requirements.in
88
- "--cache-dir"
9-
- /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpefZfz5
9+
- /tmp/.tmpZQ46PE
1010
env:
11-
VIRTUAL_ENV: /var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/.tmpYoAohH/.venv
11+
VIRTUAL_ENV: /tmp/.tmp9gtXd4/.venv
1212
---
1313
success: true
1414
exit_code: 0
1515
----- stdout -----
1616
# This file was autogenerated by Puffin v0.0.1 via the following command:
17-
# [BIN_PATH] pip-compile requirements.in --cache-dir [CACHE_DIR]
17+
# puffin pip-compile requirements.in --cache-dir [CACHE_DIR]
1818
click==8.1.7
1919
# via flask
2020
flask @ git+https://github.com/pallets/flask.git@d92b64aa275841b0c9aea3903aba72fbc4275d91

0 commit comments

Comments
 (0)