1+ default :
2+ @ just --list
3+
14# Development helpers for the monorepo
25
6+ # Python version used for development
7+ PYTHON_DEV_VERSION := " 3.13"
8+
39# Python versions used for multi-version testing/building with uv
410PY_VERSIONS := " 3.10 3.11 3.12 3.13"
511PY_SHORT_VERSIONS := " 10 11 12 13"
12+
613# Print toolchain versions to verify the dev environment
714env :
15+ uv --version
816 python3 --version
917 cargo --version
1018 rustc --version
1119 maturin --version
1220
21+ clean :
22+ rm -rf .venv **/ __pycache__ **/ *.pyc **/ *.pyo **/ .pytest_cache
23+ rm -rf codetracer-python-recorder/ target codetracer-python-recorder/ **/ *.so
24+
25+
1326# Create a local virtualenv for Python tooling
1427venv :
15- test -d .venv || python3 -m venv .venv
16-
17- # Build and develop-install the Rust-backed Python module
18- build-rust :
19- test -d .venv || python3 -m venv .venv
20- VIRTUAL_ENV=.venv maturin develop -m crates/ codetracer-python-recorder/ Cargo.toml
28+ uv venv -p python{{ PYTHON_DEV_VERSION}}
2129
22- # Smoke test the Rust module after build
23- smoke-rust :
24- .venv/ bin/ python -m pip install -U pip pytest
25- .venv/ bin/ python -m pytest crates/ codetracer-python-recorder/ test -q
30+ dev :
31+ just venv
32+ uv run --directory codetracer-python-recorder maturin develop --uv
2633
27- # Run the Python test suite for the pure-Python recorder
2834test :
29- python3 -m unittest discover -v
35+ just venv
36+ uv run pytest
37+
38+ build :
39+ uv run --directory codetracer-python-recorder maturin build
3040
3141# Run the test suite across multiple Python versions using uv
3242test-uv-all :
@@ -36,13 +46,13 @@ test-uv-all:
3646# Build wheels for all target Python versions with maturin
3747build-rust-uv-all :
3848 for v in {{ PY_VERSIONS}} ; do \
39- maturin build --interpreter " python $v" -m crates / codetracer-python-recorder/ Cargo.toml --release; \
49+ uv run -p " $v" --directory codetracer-python-recorder maturin build --release; \
4050 done
4151
4252# Smoke the built Rust wheels across versions using uv
43- smoke -rust-uv-all:
53+ test -rust-uv-all:
4454 for v in {{ PY_SHORT_VERSIONS}} ; do \
45- file=(crates / codetracer-python-recorder/ target/ wheels/ codetracer_python_recorder-*-cp3$v-cp3$v-*.whl); \
55+ file=(codetracer-python-recorder/ target/ wheels/ codetracer_python_recorder-*-cp3$v-cp3$v-*.whl); \
4656 file=" ${file[0]}" ; \
47- uv run -p " python3.$v" --with " ${file}" --with pytest -- python -m pytest crates / codetracer-python-recorder / test -q; \
57+ uv run -p " python3.$v" --with " ${file}" --with pytest -- pytest -q; \
4858 done
0 commit comments