Skip to content

Commit

Permalink
Python files should go in $PREFIX/dist-packages on debian
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed Apr 29, 2020
1 parent cf72ef0 commit ec1c315
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec1c315

Please sign in to comment.