summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-01-24 15:08:34 +0100
committerMichael Schroeder <mls@suse.de>2014-01-24 15:08:34 +0100
commit41fde7e42a902c6ed829622ca6d2006e48c255ba (patch)
tree42d750c578c8f26d873c80861ca597ee31ab4ba3
parent62e1095f3e11250127b63e3bb1f2cb4a855a69f3 (diff)
downloadlibsolv-41fde7e42a902c6ed829622ca6d2006e48c255ba.tar.gz
libsolv-41fde7e42a902c6ed829622ca6d2006e48c255ba.tar.bz2
libsolv-41fde7e42a902c6ed829622ca6d2006e48c255ba.zip
fix for old swig versions
-rw-r--r--bindings/python/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
index 6c1b514..8b5c72c 100644
--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -5,6 +5,9 @@ SET (PythonInterp_FIND_VERSION ${PYTHONLIBS_VERSION_STRING})
FIND_PACKAGE (PythonInterp REQUIRED)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+IF (NOT DEFINED PYTHON_VERSION_MAJOR)
+ SET (PYTHON_VERSION_MAJOR 2)
+ENDIF (NOT DEFINED PYTHON_VERSION_MAJOR)
IF (${PYTHON_VERSION_MAJOR} GREATER 2)
SET (SWIG_PY_FLAGS -DPYTHON3=1)
ENDIF (${PYTHON_VERSION_MAJOR} GREATER 2)