aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2017-08-24 11:38:19 +0200
committerChristian Tismer <tismer@stackless.com>2017-08-24 13:35:57 +0000
commitc14949413fac467a94ba7dbc0e613fa1c3594358 (patch)
treeb5aad2c593cdc632396a74575cfe34c1d0d35848
parenta86078e015d9daaa50d97a888e12a29b7f5105d3 (diff)
consistently name site-packages in Shiboken and PySide
The variable used for the python site-packages is inconsistent. Instead of "SITE_PACKAGE", we use "PYTHON_SITE_PACKAGES" everywhere. Task-number: PYSIDE-563 Change-Id: I4d2d49f20f5a0a13439bc7b8c79ab318cd831cb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Julien Schueller <schueller@phimeca.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--sources/pyside2/CMakeLists.txt8
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt4
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake2
-rw-r--r--sources/pyside2/libpyside/PySide2Config-spec.cmake.in2
-rw-r--r--sources/pyside2/libpyside/pyside2.pc.in2
5 files changed, 9 insertions, 9 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 5b7de8d2..cde16369 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -369,19 +369,19 @@ add_custom_target(dist
echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-if (NOT SITE_PACKAGE)
+if (NOT PYTHON_SITE_PACKAGES)
execute_process(
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "if True:
from distutils import sysconfig
from os.path import sep
print(sysconfig.get_python_lib(1, 0, prefix='${CMAKE_INSTALL_PREFIX}').replace(sep, '/'))
"
- OUTPUT_VARIABLE SITE_PACKAGE
+ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT SITE_PACKAGE)
+ if (NOT PYTHON_SITE_PACKAGES)
message(FATAL_ERROR "Could not detect Python module installation directory.")
elseif (APPLE)
- message(STATUS "!!! The generated bindings will be installed on ${SITE_PACKAGE}, is it right!?")
+ message(STATUS "!!! The generated bindings will be installed on ${PYTHON_SITE_PACKAGES}, is it right!?")
endif()
endif()
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 01d9f64c..31810b68 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -23,9 +23,9 @@ endforeach()
# install
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
- DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_utils.py
- DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index 468ce51b..77653925 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -108,7 +108,7 @@ macro(create_pyside_module
endif()
# install
- install(TARGETS ${module_name} LIBRARY DESTINATION ${SITE_PACKAGE}/PySide2)
+ install(TARGETS ${module_name} LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/PySide2)
string(TOLOWER ${module_name} lower_module_name)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide2/${module_name}/pyside2_${lower_module_name}_python.h
DESTINATION include/PySide2${pyside2_SUFFIX}/${module_name}/)
diff --git a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
index 822b8e4c..4281ade5 100644
--- a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
+++ b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
@@ -14,5 +14,5 @@ elseif(WIN32)
else()
SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
endif()
-SET(PYSIDE_PYTHONPATH "@SITE_PACKAGE@")
+SET(PYSIDE_PYTHONPATH "@PYTHON_SITE_PACKAGES@")
SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems")
diff --git a/sources/pyside2/libpyside/pyside2.pc.in b/sources/pyside2/libpyside/pyside2.pc.in
index 4f8b5e6e..37a11598 100644
--- a/sources/pyside2/libpyside/pyside2.pc.in
+++ b/sources/pyside2/libpyside/pyside2.pc.in
@@ -3,7 +3,7 @@ exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include/PySide2@pyside2_SUFFIX@
typesystemdir=@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems
-pythonpath=@SITE_PACKAGE@
+pythonpath=@PYTHON_SITE_PACKAGES@
Name: PySide2@pyside2_SUFFIX@
Description: Support library for Python bindings of Qt5-based libraries.