Skip to content

Scope Python extension linking to wheel builds - #226

Merged
timkpaine merged 2 commits into
mainfrom
fix-pyo3-test-target
Nov 22, 2026
Merged

timkpaine merged 2 commits into
mainfrom
fix-pyo3-test-target

Conversation

@timkpaine

@timkpaine timkpaine commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Workspace-wide Rust tests fail to link the Python binding crate because the permanent PyO3 extension-module feature disables linking against libpython.

Remove that feature and set PYO3_BUILD_EXTENSION_MODULE=1 through hatch-rs when building the Python extension. Rust tests keep normal Python linking, while wheels use extension linking. For projects with a C ABI library, apply the setting only to the Python artifact. Both Rust and Rust/JS/WASM templates keep their Rust test targets enabled.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine timkpaine added part: build PRs or issues related to the build lang: rust PRs or issues related to Rust type: bug Concrete, reproducible bugs labels Nov 22, 2026
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine timkpaine changed the title Disable Rust test harnesses for Python extension crates Scope Python extension linking to wheel builds Nov 22, 2026
@timkpaine
timkpaine merged commit 7fe7299 into main Nov 22, 2026
27 checks passed
@timkpaine
timkpaine deleted the fix-pyo3-test-target branch November 22, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang: rust PRs or issues related to Rust part: build PRs or issues related to the build type: bug Concrete, reproducible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant