From 8004542c3c8bb0acbd71764c8306354621eeedf7 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Sat, 14 Jun 2025 00:46:35 +0200 Subject: [PATCH 1/2] [CMake] Don't copy `*.in` files from `etc` to build tree These files should not leave the source tree. --- CMakeLists.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7e8b143ea012..fe515e875cbac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,7 +314,7 @@ add_custom_command(OUTPUT ${stamp_file} #---Copy files to the build area at build time--------------------------------- -set(directories_to_copy etc test icons fonts macros tutorials) +set(directories_to_copy test icons fonts macros tutorials) if(http) list(APPEND directories_to_copy js) endif() @@ -337,6 +337,25 @@ foreach(dir_to_copy ${directories_to_copy}) DEPENDS ${artifacts_in}) endforeach() +#---Copy etc/* files individually to the build area at build time--------------------------------- +# The reason why we don't copy these files with copy_directory as above is that +# we want to exclude a subset of the files. +file(GLOB_RECURSE artifact_files RELATIVE ${CMAKE_SOURCE_DIR} etc/*) + +# Exclude the *.in files, just like in the install tree +list(FILTER artifact_files EXCLUDE REGEX "\.(in)$") + +foreach(artifact_file ${artifact_files}) + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${artifact_file} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/${artifact_file} ${CMAKE_BINARY_DIR}/${artifact_file} + COMMENT "Copying ${CMAKE_SOURCE_DIR}/${artifact_file}" + DEPENDS ${CMAKE_SOURCE_DIR}/${artifact_file}) + list(APPEND all_artifacts ${CMAKE_BINARY_DIR}/${artifact_file}) +endforeach() + +unset(artifact_files) + + add_custom_target(move_artifacts DEPENDS ${stamp_file} ${all_artifacts}) From 6373e074009e7d614ee608e7d3d1733bf228c5c2 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Sat, 14 Jun 2025 00:48:13 +0200 Subject: [PATCH 2/2] [Python] Don't include JsMVA in builds The JsMVA package is undocumented, untested, and lagging behind in terms of the JsROOT version that it uses. At this point, there is no clear reason for including it in the ROOT builds, so this commit suggests to remove it from the build and install tree temporarily, until we are sure that it works (also with the newest JsROOT version). --- CMakeLists.txt | 4 ++++ bindings/pyroot/pythonizations/CMakeLists.txt | 12 ++++++------ .../pyroot/pythonizations/python/ROOT/__init__.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe515e875cbac..3d0435b589210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,6 +345,9 @@ file(GLOB_RECURSE artifact_files RELATIVE ${CMAKE_SOURCE_DIR} etc/*) # Exclude the *.in files, just like in the install tree list(FILTER artifact_files EXCLUDE REGEX "\.(in)$") +# Exclude etc/notebook/JsMVA +list(FILTER artifact_files EXCLUDE REGEX "^etc/notebook/JsMVA/") + foreach(artifact_file ${artifact_files}) add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${artifact_file} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/${artifact_file} ${CMAKE_BINARY_DIR}/${artifact_file} @@ -625,6 +628,7 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) endif() install(DIRECTORY etc/ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} USE_SOURCE_PERMISSIONS ${DIR_PERMISSIONS} + PATTERN "notebook/JsMVA" EXCLUDE PATTERN "system.rootrc" EXCLUDE PATTERN "system.rootauthrc" EXCLUDE PATTERN "system.rootdaemonrc" EXCLUDE diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt index af59c5e997769..9a16d7d2887ca 100644 --- a/bindings/pyroot/pythonizations/CMakeLists.txt +++ b/bindings/pyroot/pythonizations/CMakeLists.txt @@ -71,12 +71,12 @@ list(APPEND PYROOT_EXTRA_HEADERS inc/TPyDispatcher.h) set(py_sources - ROOT/JsMVA/DataLoader.py - ROOT/JsMVA/Factory.py - ROOT/JsMVA/JPyInterface.py - ROOT/JsMVA/JsMVAMagic.py - ROOT/JsMVA/OutputTransformer.py - ROOT/JsMVA/__init__.py + #ROOT/JsMVA/DataLoader.py + #ROOT/JsMVA/Factory.py + #ROOT/JsMVA/JPyInterface.py + #ROOT/JsMVA/JsMVAMagic.py + #ROOT/JsMVA/OutputTransformer.py + #ROOT/JsMVA/__init__.py ROOT/_application.py ROOT/_asan.py ROOT/_facade.py diff --git a/bindings/pyroot/pythonizations/python/ROOT/__init__.py b/bindings/pyroot/pythonizations/python/ROOT/__init__.py index 4f93a18a18624..0cdf689ca2166 100644 --- a/bindings/pyroot/pythonizations/python/ROOT/__init__.py +++ b/bindings/pyroot/pythonizations/python/ROOT/__init__.py @@ -180,7 +180,7 @@ def find_spec(self, fullname: str, path, target=None) -> ModuleSpec: ip = get_ipython() if hasattr(ip, "kernel"): import JupyROOT - from . import JsMVA + # from . import JsMVA # Register cleanup import atexit