summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-01-21 13:18:36 +0100
committerChristian Heimes <cheimes@redhat.com>2016-03-04 18:57:00 +0100
commit4dc934a5f3fbeea7e877aaadcb13a6eabb635463 (patch)
tree7c214d07501f21df0a3edc6c68e6fe088d954cee /CMakeLists.txt
parent4682e654ecbaef21879bb65db9e939089fda0b72 (diff)
downloadpki-4dc934a5f3fbeea7e877aaadcb13a6eabb635463.tar.gz
pki-4dc934a5f3fbeea7e877aaadcb13a6eabb635463.tar.xz
pki-4dc934a5f3fbeea7e877aaadcb13a6eabb635463.zip
Package pki client library for Python 3
Dogtag's Python code has been compatible with Python 3 for a while. A new package pki-base-python3 provides the pki package for clients. As of now pki.server is not packages for Python 3. The pki-base package also provides pki-base-python2. https://fedorahosted.org/pki/ticket/1739
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 25 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4fd15e39..c74605633 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,10 +98,34 @@ execute_process(
${PYTHON_EXECUTABLE} -c
"from distutils.sysconfig import get_python_lib; print get_python_lib()"
OUTPUT_VARIABLE
- PYTHON_SITE_PACKAGES
+ PYTHON2_SITE_PACKAGES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+# CMake doesn't support multiple PythonInterp
+execute_process(
+ COMMAND
+ python3 -c
+ "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
+ OUTPUT_VARIABLE
+ PYTHON3_SITE_PACKAGES
+ ERROR_VARIABLE
+ PYTHON3_ERROR
+ RESULT_VARIABLE
+ PYTHON3_RESULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+if(PYTHON3_RESULT)
+ message(WARNING "python3 not found: ${PYTHON3_RESULT}")
+ if(PYTHON3_ERROR)
+ message(WARNING ${PYTHON3_ERROR})
+ endif()
+ unset(PYTHON3_SITE_PACKAGES)
+endif()
+unset(PYTHON3_RESULT)
+unset(PYTHON3_ERROR)
+
# config.h checks
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)