Skip to content

[Python] Fix ROOT include directory resolution for Python wheels - #20915

Closed
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:getincludedir_fixup
Closed

guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:getincludedir_fixup

Conversation

@guitargeek

@guitargeek guitargeek commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor

As of commit a5b1ed9, ROOT became smarter about finding the include path in the install tree, inferring the correct relative path from $ROOTSYS and the CMAKE_INSTALL_INCLUDEDIR variable at build time. Before, that only happened for gnuinstall=ON, but now it always happens.

However, for the Python wheel, we are breaking the assumptions that ROOT makes by moving around directories in the install tree. Fortunately, we are moving directories around such that in the end, it has same structure as the build tree. Hence, we put the build tree marker in the Python package, so ROOT thinks the relative resource paths from the build tree apply.

@guitargeek
guitargeek requested a review from vepadulano January 16, 2026 12:41
@guitargeek guitargeek self-assigned this Jan 16, 2026
@guitargeek
guitargeek requested a review from dpiparo as a code owner January 16, 2026 12:41
@guitargeek guitargeek added bug in:Python Interface build-python-wheels Run the workflow to build Python wheels labels Jan 16, 2026
@guitargeek

Copy link
Copy Markdown
Contributor Author

A more robust alternative to this hotfix:

As of commit a5b1ed9, ROOT became smarter about finding the include path
in the install tree, inferring the correct relative path from $ROOTSYS
and the CMAKE_INSTALL_INCLUDEDIR variable at build time. Before, that
only happened for `gnuinstall=ON`, but now it always happens.

However, for the Python wheel, we are breaking the assumptions that
ROOT makes by moving around directories in the install tree.
Fortunately, we are moving directories around such that in the end,
it has same structure as the build tree. Hence, we put the build tree
marker in the Python package, so ROOT thinks the relative resource
paths from the build tree apply.
@github-actions

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 14h 5m 12s ⏱️
 3 811 tests  3 811 ✅ 0 💤 0 ❌
76 733 runs  76 733 ✅ 0 💤 0 ❌

Results for commit 690c9cb.

@guitargeek

Copy link
Copy Markdown
Contributor Author

Superseeded by #20924

@guitargeek guitargeek closed this Jan 19, 2026
@guitargeek
guitargeek deleted the getincludedir_fixup branch January 19, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug build-python-wheels Run the workflow to build Python wheels in:Python Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant