Skip to content

Conversation

@guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Jun 14, 2025

Avoid unneeded artifacts in the library installation directory, in particular empty directories if the Python interfaces are installed in a directory other than the library installation directory.

Motivated by:

More detail in the commit description.

@guitargeek guitargeek self-assigned this Jun 14, 2025
@guitargeek guitargeek added in:Build System clean build Ask CI to do non-incremental build on PR labels Jun 14, 2025
@github-actions
Copy link

github-actions bot commented Jun 14, 2025

Test Results

    21 files      21 suites   3d 9h 6m 38s ⏱️
 3 217 tests  3 215 ✅ 0 💤 2 ❌
65 840 runs  65 838 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit c9ddf72.

♻️ This comment has been updated with latest results.

@guitargeek guitargeek force-pushed the python_install_dir branch from 6950325 to cebd367 Compare June 14, 2025 20:58
@guitargeek guitargeek marked this pull request as ready for review June 14, 2025 20:58
@guitargeek guitargeek requested a review from bellenot as a code owner June 14, 2025 20:58
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${byproduct}.pcm DESTINATION ${CMAKE_INSTALL_LIBDIR})
endforeach()

list(APPEND core_implicit_modules "-mByproduct" "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the semantic of those additions?

list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C")
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes")
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it would now be listed twice in core_implicit_modules, i.e. once more inside the new foreach loop.

Explicitly install byproducts of generating Core dictionaries, and put
the CMake code right next to where these byproducts are declared. This
is better than relying on all `.pcm` files getting installed via some
other part of the CMake code.
Explicitly installing the `modules.idx` file is better than copying it
by regex when copying the full library output directory.
Explicitly listing all the `pcm` files that otherwise would not get
installed seems tedious, but it has one clear advantage over
`install(DIRECTORY ...)`. The problem with the latter is that it
copies any subdirectories, not matter if the files in it were matched by
regex or not. So what happens is that you end up with several empty
directories in the install tree, notably the full directory structure of
the Python interfaces, in case they are installed to a different
directory. One way to fix this is to install the individual pcm files
instead, as suggested by this commit.
@guitargeek guitargeek force-pushed the python_install_dir branch from 1286fe7 to c9ddf72 Compare July 29, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Build System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants