Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
INSTALL_DIR = tempfile.mkdtemp()

# Name given to an internal directory within the build directory
# used to mimick the structure of the target installation directory
# used to mimic the structure of the target installation directory
# in the user Python environment, usually named "site-packages"
ROOT_BUILD_INTERNAL_DIRNAME = "mock_site_packages"

Expand Down Expand Up @@ -147,6 +147,20 @@ def run(self):
self.copy_tree(os.path.join(INSTALL_DIR, "tutorials"), os.path.join(root_package_dir, "tutorials"))
self.copy_file(os.path.join(INSTALL_DIR, "LICENSE"), os.path.join(root_package_dir, "LICENSE"))

# As of commit [1], 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.
#
# However, for the Python wheel, we are breaking the assumptions that
# ROOT makes by moving around directories in the install tree.
# Fortunately, we are moving directories around such that in the end,
# it has same structure as the build tree. Hence, we put the build tree
# marker in the Python package, so ROOT thinks the relative resource
# paths from the build tree apply.
#
# [1] https://github.com/root-project/root/commit/a5b1ed9
pathlib.Path(os.path.join(root_package_dir, "lib/root-build-tree-marker")).touch()

def get_outputs(self):
outputs = _install.get_outputs(self)
return outputs
Expand Down
Loading