Skip to content

fix(python): bake PYO3_PYTHON libdir into facade test RUNPATH (#1487) - #1593

Merged
zackees merged 5 commits into
mainfrom
fix/1487-facade-test-rpath
Sep 30, 2026
Merged

zackees merged 5 commits into
mainfrom
fix/1487-facade-test-rpath

Conversation

@zackees

@zackees zackees commented Sep 29, 2026

Copy link
Copy Markdown
Member

Fixes #1487.

RED: with PYO3_PYTHON at a uv-managed shared Python and no LD_LIBRARY_PATH, soldr cargo test -p fbuild-python --test python_facades -- --ignored exited 127 before any test ran (libpython not found).

Fix: crates/fbuild-python/build.rs emits cargo:rustc-link-arg-tests=-Wl,-rpath,<lib_dir> with lib_dir from pyo3_build_config::get(), i.e. the exact interpreter PyO3 links against, so link and load can't disagree. It is unix-only, scoped to test targets (the extension-module build returns early and is untouched), and does not touch any existing LD_LIBRARY_PATH.

GREEN: same command, no LD_LIBRARY_PATH, 22/22 pass. New test loaded_libpython_comes_from_the_embedded_interpreters_libdir reads /proc/self/maps and fails if the loaded libpython isn't under the embedded interpreter's LIBDIR. clippy -D warnings clean.

The python-facade-tests job in check-ubuntu.yml drops its LD_LIBRARY_PATH export (PYTHONHOME stays); its Python 3.10 run is the check that this holds on the pinned interpreter. The tests README now documents the single command. ci/render_workflows.py --check is clean.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: FastLED/fbuild/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5c0cf050-4d3c-4b55-9616-8a003caa70cc

📥 Commits

Reviewing files that changed from the base of the PR and between 5164806 and 9514693.

📒 Files selected for processing (4)
  • .github/workflows/check-ubuntu.yml
  • crates/fbuild-python/build.rs
  • crates/fbuild-python/tests/README.md
  • crates/fbuild-python/tests/python_facades.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Sep 30, 2026
@zackees
zackees merged commit 862d7c4 into main Sep 30, 2026
20 checks passed
@zackees
zackees deleted the fix/1487-facade-test-rpath branch October 16, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Fix embedded-Python facade test runtime loader path for uv libpython

1 participant