Skip to content

Commit f09b4ce

Browse files
committed
[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.
1 parent 8592d55 commit f09b4ce

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
@@ -239,7 +239,8 @@ install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
239239
# Install Python sources and bytecode
240240
install(DIRECTORY ${localruntimedir}/ROOT
241241
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
242-
COMPONENT libraries)
242+
COMPONENT libraries
243+
PATTERN *.so EXCLUDE)
243244

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

0 commit comments

Comments
 (0)