From d6a075f43f827c773a89f5f04ccafc87105f9764 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Tue, 19 Nov 2024 15:55:35 -0500 Subject: [PATCH] Fix just command for maturin when using uv --- src/project_generator.rs | 4 ++-- ...ject__project_generator__tests__save_justfile_maturin.snap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/project_generator.rs b/src/project_generator.rs index b376fb0..49eaff1 100644 --- a/src/project_generator.rs +++ b/src/project_generator.rs @@ -999,10 +999,10 @@ fn create_pyo3_justfile(module: &str, pyo3_python_manager: &Pyo3PythonManager) - uv lock --upgrade @develop: - uv run maturin develop + uv run maturin develop --uv @develop-release: - uv run maturin develop -r + uv run maturin develop -r --uv @install: && develop uv sync --frozen --all-extras diff --git a/src/snapshots/python_project__project_generator__tests__save_justfile_maturin.snap b/src/snapshots/python_project__project_generator__tests__save_justfile_maturin.snap index 39443f8..5d49cad 100644 --- a/src/snapshots/python_project__project_generator__tests__save_justfile_maturin.snap +++ b/src/snapshots/python_project__project_generator__tests__save_justfile_maturin.snap @@ -3,4 +3,4 @@ source: src/project_generator.rs expression: content snapshot_kind: text --- -"@_default:\n just --list\n\n@lock:\n uv lock\n\n@lock-upgrade:\n uv lock --upgrade\n\n@develop:\n uv run maturin develop\n\n@develop-release:\n uv run maturin develop -r\n\n@install: && develop\n uv sync --frozen --all-extras\n\n@install-release: && develop-release\n uv sync --frozen --all-extras\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 check\n just --justfile {{justfile()}} ruff-check\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 uv run mypy my_project tests\n\n@ruff-check:\n uv run ruff check my_project tests --fix\n\n@ruff-format:\n uv run ruff format my_project tests\n\n@test *args=\"\":\n uv run pytest {{args}}\n" +"@_default:\n just --list\n\n@lock:\n uv lock\n\n@lock-upgrade:\n uv lock --upgrade\n\n@develop:\n uv run maturin develop --uv\n\n@develop-release:\n uv run maturin develop -r --uv\n\n@install: && develop\n uv sync --frozen --all-extras\n\n@install-release: && develop-release\n uv sync --frozen --all-extras\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 check\n just --justfile {{justfile()}} ruff-check\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 uv run mypy my_project tests\n\n@ruff-check:\n uv run ruff check my_project tests --fix\n\n@ruff-format:\n uv run ruff format my_project tests\n\n@test *args=\"\":\n uv run pytest {{args}}\n"