Skip to content

Commit 1b92837

Browse files
committed
chore: gate pyo3 extension module behind optional feature
1 parent 8d6d0a5 commit 1b92837

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Justfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ dev:
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+
uv run 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
4045
test-pure:
4146
uv run --group dev --group test pytest codetracer-pure-python-recorder

codetracer-python-recorder/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ repository = "https://github.com/metacraft-labs/codetracer-python-recorder"
1010
name = "codetracer_python_recorder"
1111
crate-type = ["cdylib", "rlib"]
1212

13+
[features]
14+
extension-module = ["pyo3/extension-module"]
15+
default = ["extension-module"]
16+
1317
[dependencies]
1418
pyo3 = { version = "0.25.1" }
1519
runtime_tracing = "0.14.0"

0 commit comments

Comments
 (0)