Skip to content

Commit 22e0a13

Browse files
ellertguitargeek
authored andcommitted
[PyROOT] Don't install the python modules twice
The binary python modules were moved one directory level down into the ROOT and cppyy directories, so that they reside alongside the python files in the same directories. The install rule for the python files must therefore be extended to exclude the binary modules (PATTERN *.so EXCLUDE) so that these are not installed a second time overwriting the files installed by the install rule for the binary modules with another copy with the wrong file permissions. Also use the no-version option for the cppyy binary module as is already done for the pythonization binary module, since it is now installed in the python directory. Before it was installed in the library directory with an unversioned symlink in the python directory. (cherry picked from commit 5b09965)
1 parent 3ecc2c1 commit 22e0a13

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ endif()
7373
add_library(cppyy SHARED src/CPyCppyyPyModule.cxx)
7474

7575
# Set the suffix to '.so' and the prefix to 'lib'
76-
set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES}
76+
set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES_NO_VERSION}
7777
LIBRARY_OUTPUT_DIRECTORY ${localruntimedir}/cppyy)
7878
if(MSVC)
7979
target_link_libraries(cppyy PRIVATE CPyCppyy)

bindings/pyroot/cppyy/cppyy/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ endforeach()
3131
# Install Python sources and bytecode
3232
install(DIRECTORY ${localruntimedir}/cppyy
3333
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
34-
COMPONENT libraries)
34+
COMPONENT libraries
35+
PATTERN *.so EXCLUDE)
3536

3637
if(NOT MSVC)
3738
ROOT_ADD_TEST_SUBDIRECTORY(test)
38-
endif()
39+
endif()

bindings/pyroot/pythonizations/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
238238
# Install Python sources and bytecode
239239
install(DIRECTORY ${localruntimedir}/ROOT
240240
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
241-
COMPONENT libraries)
241+
COMPONENT libraries
242+
PATTERN *.so EXCLUDE)
242243

243244
# Install headers required by pythonizations
244245
install(FILES ${PYROOT_EXTRA_HEADERS}

0 commit comments

Comments
 (0)