Skip to content

Make AUDITWHEEL_LD_LIBRARY_PATH override DT_RUNPATH - #738

Open
1998LJ wants to merge 1 commit into
pypa:mainfrom
1998LJ:fix/runpath-auditwheel-ld-library-path
Open

1998LJ wants to merge 1 commit into
pypa:mainfrom
1998LJ:fix/runpath-auditwheel-ld-library-path

Conversation

@1998LJ

@1998LJ 1998LJ commented Sep 19, 2026 •

Copy link
Copy Markdown

Closes #737.

AUDITWHEEL_LD_LIBRARY_PATH currently shares the same internal search-path bucket as LD_LIBRARY_PATH, which places both after an ELF's DT_RUNPATH.

This separates the auditwheel-specific environment path from the standard LD_LIBRARY_PATH and gives it the lower-risk precedence discussed in #737:

RPATH > AUDITWHEEL_LD_LIBRARY_PATH > RUNPATH > LD_LIBRARY_PATH

The existing precedence of RUNPATH over the standard LD_LIBRARY_PATH is intentionally preserved.

The change also keeps compatibility with callers that provide the existing ldpaths dictionary shape without the new auditwheel-specific entry.

Tests cover:

  • RUNPATH continuing to override LD_LIBRARY_PATH;
  • AUDITWHEEL_LD_LIBRARY_PATH overriding RUNPATH;
  • all three paths being present simultaneously;
  • root != "/" behavior;
  • legacy ldpaths dictionaries.

Validation:

  • pytest tests/unit/test_lddtree.py
  • pytest tests/unit
  • nox -s lint
  • git diff --check

@1998LJ
1998LJ force-pushed the fix/runpath-auditwheel-ld-library-path branch from b0a8069 to 405980f Compare September 27, 2026 12:11
@auvipy
auvipy requested review from auvipy, mayeut and mhsmith September 27, 2026 14:01
@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.22%. Comparing base (b9a93b0) to head (405980f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #738      +/-   ##
==========================================
+ Coverage   96.07%   96.22%   +0.15%     
==========================================
  Files          23       23              
  Lines        2036     2038       +2     
  Branches      388      389       +1     
==========================================
+ Hits         1956     1961       +5     
+ Misses         46       44       -2     
+ Partials       34       33       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DT_RUNPATH takes precedence over AUDITWHEEL_LD_LIBRARY_PATH

1 participant