File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed
codetracer-python-recorder Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -71,3 +71,8 @@ artefact, it will be used only for testing.
7171
7272Refer to the design-docs folder for the current planned design. Add/update files in the folder to match what was implemented in this task.
7373
74+
75+ --- FOLLOW UP TASK ---
76+ 1. In codetracer-python-recorder/Cargo.toml, move pyo3’s extension-module feature to an optional crate feature and enable it only for release builds.
77+ 2. Update Justfile (and CI scripts) to run cargo test --no-default-features so the test binary links with the Python C library.
78+ 3. Add pyo3 with auto-initialize under [dev-dependencies] if tests require the interpreter to be initialized automatically.
Original file line number Diff line number Diff line change 3232 uv run --directory codetracer-python-recorder maturin develop --uv
3333
3434# Run unit tests of dev build
35- test :
36- uv run --group dev --group test pytest
37- uv run --group dev --group test cargo test --manifest-path codetracer-python-recorder/ Cargo.toml
35+ test : cargo-test py-test
36+
37+ # Run Rust unit tests without default features to link Python C library
38+ cargo-test :
39+ cargo test --manifest-path codetracer-python-recorder/ Cargo.toml --no-default-features
3840
41+ py-test :
42+ uv run --group dev --group test pytest
43+
3944# Run tests only on the pure recorder
4045test-pure :
4146 uv run --group dev --group test pytest codetracer-pure-python-recorder
Original file line number Diff line number Diff line change @@ -10,7 +10,14 @@ repository = "https://github.com/metacraft-labs/codetracer-python-recorder"
1010name = " codetracer_python_recorder"
1111crate-type = [" cdylib" , " rlib" ]
1212
13+ [features ]
14+ extension-module = [" pyo3/extension-module" ]
15+ default = [" extension-module" ]
16+
1317[dependencies ]
14- pyo3 = { version = " 0.25.1" , features = [ " extension-module " , " abi3-py312 " ] }
18+ pyo3 = { version = " 0.25.1" }
1519runtime_tracing = " 0.14.0"
1620bitflags = " 2.4"
21+
22+ [dev-dependencies ]
23+ pyo3 = { version = " 0.25.1" , features = [" auto-initialize" ] }
You can’t perform that action at this time.
0 commit comments