From ec1c315968357505ffa3c4283560f1aa6fa19578 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 29 Apr 2020 10:03:08 +0200 Subject: [PATCH] Python files should go in $PREFIX/dist-packages on debian --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fefdc09e926..cd6f3cd219f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,7 +247,11 @@ install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc) if (OPM_ENABLE_PYTHON) # ------------------------------------------------------------------------- # 1: Wrap C++ functionality in Python - set(PYTHON_PACKAGE_PATH "site-packages") + if (EXISTS "/etc/debian_version") + set(PYTHON_PACKAGE_PATH "dist-packages") + else() + set(PYTHON_PACKAGE_PATH "site-packages") + endif() set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") make_directory(${PROJECT_BINARY_DIR}/python)