Skip to content

Commit 9a14a35

Browse files
committed
Add option to pyo3 justfile to build in release mode
1 parent 797d1ab commit 9a14a35

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/project_generator.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,15 @@ fn create_pyo3_justfile(module: &str) -> String {
562562
r#"@develop:
563563
maturin develop
564564
565+
@develop-release:
566+
maturin develop -r
567+
565568
@install: && develop
566569
python -m pip install -r requirements-dev.txt
567570
571+
@install-release: && develop-release
572+
python -m pip install -r requirements-dev.txt
573+
568574
@lint:
569575
echo cargo check
570576
just --justfile {{{{justfile()}}}} check

src/snapshots/python_project__project_generator__tests__save_justfile_maturin.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: src/project_generator.rs
33
expression: content
44
---
5-
"@develop:\n maturin develop\n\n@install: && develop\n python -m pip install -r requirements-dev.txt\n\n@lint:\n echo cargo check\n just --justfile {{justfile()}} check\n echo cargo clippy\n just --justfile {{justfile()}} clippy\n echo cargo fmt\n just --justfile {{justfile()}} fmt\n echo mypy\n just --justfile {{justfile()}} mypy\n echo ruff linting\n just --justfile {{justfile()}} ruff\n echo ruff formatting\n just --justfile {{justfile()}} ruff-format\n\n@check:\n cargo check\n\n@clippy:\n cargo clippy --all-targets\n\n@fmt:\n cargo fmt --all -- --check\n\n@mypy:\n mypy .\n\n@ruff:\n ruff check . --fix\n\n@ruff-format:\n ruff format my_project tests\n\n@test:\n pytest\n"
5+
"@develop:\n maturin develop\n\n@develop-release:\n maturin develop -r\n\n@install: && develop\n python -m pip install -r requirements-dev.txt\n\n@install-release: && develop-release\n python -m pip install -r requirements-dev.txt\n\n@lint:\n echo cargo check\n just --justfile {{justfile()}} check\n echo cargo clippy\n just --justfile {{justfile()}} clippy\n echo cargo fmt\n just --justfile {{justfile()}} fmt\n echo mypy\n just --justfile {{justfile()}} mypy\n echo ruff linting\n just --justfile {{justfile()}} ruff\n echo ruff formatting\n just --justfile {{justfile()}} ruff-format\n\n@check:\n cargo check\n\n@clippy:\n cargo clippy --all-targets\n\n@fmt:\n cargo fmt --all -- --check\n\n@mypy:\n mypy .\n\n@ruff:\n ruff check . --fix\n\n@ruff-format:\n ruff format my_project tests\n\n@test:\n pytest\n"

0 commit comments

Comments
 (0)