summaryrefslogtreecommitdiff
path: root/swig/python
diff options
context:
space:
mode:
authorArvin Schnell <aschnell@suse.de>2007-08-30 15:34:51 +0000
committerArvin Schnell <aschnell@suse.de>2007-08-30 15:34:51 +0000
commite706db2238e278893544c437cb014c9627d3e215 (patch)
tree7f5e5e48809348644a62fd89a7ca3f2395d54244 /swig/python
parent29d8807174f813dc474e67723d7918a3c7d4db4d (diff)
downloadlibzypp-bindings-e706db2238e278893544c437cb014c9627d3e215.tar.gz
libzypp-bindings-e706db2238e278893544c437cb014c9627d3e215.tar.bz2
libzypp-bindings-e706db2238e278893544c437cb014c9627d3e215.zip
- improved makefiles
Diffstat (limited to 'swig/python')
-rw-r--r--swig/python/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt
index 591940d..051e791 100644
--- a/swig/python/CMakeLists.txt
+++ b/swig/python/CMakeLists.txt
@@ -1,15 +1,15 @@
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
+FIND_PACKAGE(PythonInterp REQUIRED)
FIND_PACKAGE(PythonLibs REQUIRED)
-MESSAGE( STATUS "Python include path: ${PYTHON_INCLUDE_PATH}" )
-IF(DEFINED LIB)
- SET(PYTHON_LIB_PATH "/usr/${LIB}/python2.5/site-packages/")
-ELSE(DEFINED LIB)
- SET(PYTHON_LIB_PATH "/usr/lib/python2.5/site-packages/")
-ENDIF(DEFINED LIB)
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib()" OUTPUT_VARIABLE PYTHON_LIB_PATH)
+STRING(REPLACE "\n" "" PYTHON_LIB_PATH "${PYTHON_LIB_PATH}")
+
+MESSAGE(STATUS "Python executable: ${PYTHON_EXECUTABLE}")
MESSAGE(STATUS "Python lib path: ${PYTHON_LIB_PATH}")
+MESSAGE(STATUS "Python include path: ${PYTHON_INCLUDE_PATH}")
SET( SWIG_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
SET( SWIG_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/zypp.i" )