forked from key4hep/EDM4hep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the python install prefix conform to python conventions
- Loading branch information
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |