Skip to content

Commit

Permalink
python: add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Raab committed Aug 7, 2018
1 parent f30ef65 commit e863158
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
16 changes: 16 additions & 0 deletions scripts/jenkins/Jenkinsfile
Expand Up @@ -850,10 +850,26 @@ def buildAndTest(testName, image, extraCmakeFlags = [:],
}
if(install) {
sh '''\
env
python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())" || true
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='/something'))" || true
python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='/something'))" || true
export LD_LIBRARY_PATH=${WORKSPACE}/system/lib:$LD_LIBRARY_PATH
export PATH=${WORKSPACE}/system/bin:$PATH
export DBUS_SESSION_BUS_ADDRESS=`dbus-daemon --session --fork --print-address`
export LUA_CPATH="${WORKSPACE}/system/lib/lua/5.2/?.so;"
python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())" || true
python -c "import distutils; print(distutils.__file__)" || true
cat `python -c "import distutils; print(distutils.__file__.replace('.pyc', '.py'))"` || true
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='/something'))" || true
python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='/something'))" || true
kdb run_all
kill `pidof dbus-daemon`
'''
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/swig/python/CMakeLists.txt
Expand Up @@ -52,7 +52,9 @@ else ()
"from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}'))")
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "${PYTHON_GET_MODULES_DIR_COMMAND}"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
ERROR_VARIABLE PYTHON_ERROR_MESSAGE
OUTPUT_STRIP_TRAILING_WHITESPACE)
message ("PYTHON BINDING ${PYTHON_SITE_PACKAGES} with error ${PYTHON_ERROR_MESSAGE}")

install (FILES ${CMAKE_CURRENT_BINARY_DIR}/kdb.py DESTINATION ${PYTHON_SITE_PACKAGES})

Expand Down
3 changes: 2 additions & 1 deletion src/plugins/python/CMakeLists.txt
Expand Up @@ -26,8 +26,9 @@ if (DEPENDENCY_PHASE)
"from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}'))")
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "${PYTHON_GET_MODULES_DIR_COMMAND}"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
ERROR_VARIABLE PYTHON_ERROR_MESSAGE
OUTPUT_STRIP_TRAILING_WHITESPACE)
message ("PYTHON ${PYTHON_SITE_PACKAGES}")
message ("PYTHON ${PYTHON_SITE_PACKAGES} with error ${PYTHON_ERROR_MESSAGE}")
# /home/jenkins/workspace/build/system/lib/python3.5/site-packages

set (INC_PATH ${PYTHON_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/python2/CMakeLists.txt
Expand Up @@ -28,8 +28,9 @@ if (DEPENDENCY_PHASE)
"from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}'))")
execute_process (COMMAND ${PYTHON2_EXECUTABLE} -c "${PYTHON_GET_MODULES_DIR_COMMAND}"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
ERROR_VARIABLE PYTHON_ERROR_MESSAGE
OUTPUT_STRIP_TRAILING_WHITESPACE)
message ("PYTHON ${PYTHON_SITE_PACKAGES}")
message ("PYTHON ${PYTHON_SITE_PACKAGES} with error ${PYTHON_ERROR_MESSAGE}")
# /home/jenkins/workspace/build/system/lib/python2.7/site-packages
set (INC_PATH ${PYTHON2_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

Expand Down

0 comments on commit e863158

Please sign in to comment.