Skip to content

Conversation

@guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Jan 16, 2026

Using the shared library directory as the anchor to resolve the resource directories like GetIncludeDir() is more direct and robust than using GetRootSys(), which loses its meaning in some installations (e.g. what should it be when ROOT is installed by the package manager? Just /?).

Most importantly, this change lifts some more constraint from how the install tree can be reorganized after the fact. One can for example move the include and library directory around as wanted, as long as their relative paths don't change. This fixes the Python wheels, which were broken by commit a5b1ed9.

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. This commit fixes that situation.

I tested this with three build configurations:

  • no CMAKE_INSTALL_INCLUDEDIR set
  • CMAKE_INSTALL_INCLUDEDIR relative path
  • CMAKE_INSTALL_INCLUDEDIR absolute path

In all cases, gROOT->GetIncludeDir() returns the correct path, both via the root executable in the build and install tree.

@guitargeek
Copy link
Contributor Author

Hi @pcanal, once the tests pass, can you maybe review this PR since you are already familiar with my previous PR #20828? This is a followup that is important to fix the Python wheels. Thanks!

@guitargeek
Copy link
Contributor Author

Also, here are my next plans in this ROOTSYS business:

@pcanal
Copy link
Member

pcanal commented Jan 16, 2026

At that point we don't need ROOTSYS anymore

However, we should warn if ROOTSYS is set but different from the calculated one ...

@pcanal
Copy link
Member

pcanal commented Jan 16, 2026

However, for the Python wheel, we are breaking the assumptions that ROOT makes by moving around directories in the install tree.

What kind of movement is done? For Wheels is CMAKE_INSTALL_INCLUDEDIR absolute or relative?

Using the shared library directory as the anchor to resolve the resource
directories like `GetIncludeDir()` is more direct and robust than using
`GetRootSys()`, which loses its meaning in some installations (e.g. what
should it be when ROOT is installed by the package manager? Just `/`?).

Most importantly, this change lifts some more constraint from how the
install tree can be reorganized after the fact. One can for example move
the include and library directory around as wanted, as long as their
relative paths don't change. This fixes the Python wheels, which were
broken by commit a5b1ed9.

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. This commit
fixes that situation.
@github-actions
Copy link

github-actions bot commented Jan 17, 2026

Test Results

    22 files      22 suites   3d 13h 2m 16s ⏱️
 3 812 tests  3 812 ✅ 0 💤 0 ❌
76 735 runs  76 735 ✅ 0 💤 0 ❌

Results for commit 6b8877e.

♻️ This comment has been updated with latest results.

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

Labels

build-python-wheels Run the workflow to build Python wheels in:Build System in:Core Libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants