projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62e1095
)
fix for old swig versions
author
Michael Schroeder
<mls@suse.de>
Fri, 24 Jan 2014 14:08:34 +0000
(15:08 +0100)
committer
Michael Schroeder
<mls@suse.de>
Fri, 24 Jan 2014 14:08:34 +0000
(15:08 +0100)
bindings/python/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/bindings/python/CMakeLists.txt
b/bindings/python/CMakeLists.txt
index
6c1b514
..
8b5c72c
100644
(file)
--- 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)