aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/cmake/PySideSetup.cmake
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-04-18 18:58:18 +0200
committerChristian Tismer <tismer@stackless.com>2021-11-12 11:57:01 +0100
commit310d18f3708d891c9e99f8a9a713f5a0ce45d341 (patch)
treeac047ad6f2f072b6e332eda888d7b26456319de1 /sources/pyside6/cmake/PySideSetup.cmake
parent225bf1aaa5a17f8f3c2526f03a10223ea14de239 (diff)
PyPySide: check in the rest of PyPy changes
The PyPy branch has been apart from the main branch for a long time. Meanwhile, almost everything has settled and can be merged into the main branch. This has the advantage of a single branch for both configurations. This project is still not ready. It will be called ready when the Mandelbrot example can be run without any changes. To achieve that, the current threading problem must be solved. The WIP branch is kept. It now holds only the pypy-blog.txt file. Task-number: PYSIDE-535 Change-Id: I317b0e921cc6810e1b76c69991a0f8e592135c65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/cmake/PySideSetup.cmake')
-rw-r--r--sources/pyside6/cmake/PySideSetup.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/pyside6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake
index b46d09b57..4f7c71626 100644
--- a/sources/pyside6/cmake/PySideSetup.cmake
+++ b/sources/pyside6/cmake/PySideSetup.cmake
@@ -46,6 +46,18 @@ if(NOT PYSIDE_VERSION_OUTPUT)
message(FATAL_ERROR "Could not identify PySide6 version. Error: ${PYSIDE_VERSION_OUTPUT_ERROR}")
endif()
+# Detect if the Python interpreter is actually PyPy
+execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "if True:
+ pypy_version = ''
+ import sys
+ if hasattr(sys, 'pypy_version_info'):
+ pypy_version = '.'.join(map(str, sys.pypy_version_info[:3]))
+ print(pypy_version)
+ "
+ OUTPUT_VARIABLE PYPY_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
list(GET PYSIDE_VERSION_OUTPUT 0 BINDING_API_MAJOR_VERSION)
list(GET PYSIDE_VERSION_OUTPUT 1 BINDING_API_MINOR_VERSION)
list(GET PYSIDE_VERSION_OUTPUT 2 BINDING_API_MICRO_VERSION)