qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcpie...@apache.org
Subject svn commit: r1547577 - /qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
Date Tue, 03 Dec 2013 20:40:10 GMT
Author: mcpierce
Date: Tue Dec  3 20:40:10 2013
New Revision: 1547577

URL: http://svn.apache.org/r1547577
Log:
PROTON-445: Python install now honors CMAKE_INSTALL_PREFIX

The language bindings will now honor this prefix, both the default value
and a user-specified value.

Developers can override it, though, by specifying PYTHON_INSTALL_PREFIX
at the command line as well. This will allow for installing the Python
bindings to a different directory if so desired.

Modified:
    qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt?rev=1547577&r1=1547576&r2=1547577&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt Tue Dec  3 20:40:10 2013
@@ -30,12 +30,14 @@ set_target_properties(_cproton
 
 find_package(PythonInterp REQUIRED)
 
-if (NOT PYTHON_SITEARCH_PACKAGES)
-   execute_process(COMMAND ${PYTHON_EXECUTABLE}
-                           -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)"
-                           OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES
-                           OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif ()
+if (NOT PYTHON_INSTALL_PREFIX)
+  set(PYTHON_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+endif (NOT PYTHON_INSTALL_PREFIX)
+
+execute_process(COMMAND ${PYTHON_EXECUTABLE}
+  -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, prefix='${PYTHON_INSTALL_PREFIX}')"
+  OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cproton.py
                               WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message