You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: allow Rust consumers to link datafusion-python
Gate PyO3 extension-module behind a default-on crate feature, retain it in wheel builds, and run a separate executable linking regression in CI.
Generated-by: OpenAI Codex
Copy file name to clipboardExpand all lines: docs/source/contributor-guide/introduction.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,25 @@ maturin develop --uv
70
70
python -m pytest
71
71
```
72
72
73
+
### Rust tests and downstream Rust dependencies
74
+
75
+
Run the core Rust tests, including the executable linking smoke test, with:
76
+
77
+
```shell
78
+
cargo test --locked -p datafusion-python --no-default-features --features substrait
79
+
```
80
+
81
+
An installed Python interpreter and its development libraries are required.
82
+
Set `PYO3_PYTHON` to select an interpreter if needed. Do not use `--workspace`
83
+
for these tests: the FFI example crates enable `pyo3/extension-module`, which
84
+
prevents linking libpython into an executable.
85
+
86
+
Rust executables depending on `datafusion-python` should set
87
+
`default-features = false` and enable optional features such as `substrait`
88
+
as needed. The default `extension-module` feature is for Python extension
89
+
builds. Free-threaded wheel builds disable defaults to avoid `abi3` and must
90
+
explicitly enable `extension-module` (and `mimalloc` to retain the default allocator).
91
+
73
92
## Running & Installing pre-commit hooks
74
93
75
94
arrow-datafusion-python takes advantage of [pre-commit](https://pre-commit.com/) to assist developers with code linting to help reduce the number of commits that ultimately fail in CI due to linter errors. Using the pre-commit hooks is optional for the developer but certainly helpful for keeping PRs clean and concise.
0 commit comments