Skip to content

Commit

Permalink
Make the python install prefix conform to python conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jun 12, 2024
1 parent 994ac26 commit 2dccaf5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
install(DIRECTORY edm4hep DESTINATION python
find_package(Python3 REQUIRED)

# Setup the python install dir. See the discussion in
# https://github.com/AIDASoft/podio/pull/599 for more details on why this is
# done the way it is
set(edm4hep_python_lib_dir lib)
if("${Python3_SITEARCH}" MATCHES "/lib64/")
set(edm4hep_python_lib_dir lib64)
endif()

set(EDM4HEP_PYTHON_INSTALLDIR
"${CMAKE_INSTALL_PREFIX}/${edm4hep_python_lib_dir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages"
CACHE STRING
"The install prefix for the python bindings"
)

install(DIRECTORY edm4hep DESTINATION ${EDM4HEP_PYTHON_INSTALLDIR}
REGEX .*\\.in EXCLUDE
PATTERN __pycache__ EXCLUDE
)

0 comments on commit 2dccaf5

Please sign in to comment.