aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/.cmake.conf5
-rw-r--r--sources/pyside6/CMakeLists.txt1
-rw-r--r--sources/pyside6/cmake/PySideSetup.cmake25
-rw-r--r--sources/pyside6/pyside_version.py10
4 files changed, 16 insertions, 25 deletions
diff --git a/sources/pyside6/.cmake.conf b/sources/pyside6/.cmake.conf
new file mode 100644
index 000000000..07d8cc49a
--- /dev/null
+++ b/sources/pyside6/.cmake.conf
@@ -0,0 +1,5 @@
+set(pyside_MAJOR_VERSION "6")
+set(pyside_MINOR_VERSION "0")
+set(pyside_MICRO_VERSION "0")
+set(pyside_PRE_RELEASE_VERSION_TYPE "a")
+set(pyside_PRE_RELEASE_VERSION "1")
diff --git a/sources/pyside6/CMakeLists.txt b/sources/pyside6/CMakeLists.txt
index 48b892930..4fc668ea5 100644
--- a/sources/pyside6/CMakeLists.txt
+++ b/sources/pyside6/CMakeLists.txt
@@ -3,6 +3,7 @@ include(cmake/Macros/icecc.cmake) # this must be the first line!
cmake_minimum_required(VERSION 3.16)
cmake_policy(VERSION 3.16)
+include(".cmake.conf")
project(pysidebindings)
include(cmake/PySideSetup.cmake)
diff --git a/sources/pyside6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake
index 159fdcd86..e4b098ad6 100644
--- a/sources/pyside6/cmake/PySideSetup.cmake
+++ b/sources/pyside6/cmake/PySideSetup.cmake
@@ -33,18 +33,11 @@ endif()
find_package(Shiboken6 2.0.0 REQUIRED)
-set(PYSIDE_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pyside_version.py")
-set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
- ${PYSIDE_VERSION_FILE_PATH}
-)
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} "${PYSIDE_VERSION_FILE_PATH}"
- OUTPUT_VARIABLE PYSIDE_VERSION_OUTPUT
- ERROR_VARIABLE PYSIDE_VERSION_OUTPUT_ERROR
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-if(NOT PYSIDE_VERSION_OUTPUT)
- message(FATAL_ERROR "Could not identify PySide6 version. Error: ${PYSIDE_VERSION_OUTPUT_ERROR}")
-endif()
+set(BINDING_API_MAJOR_VERSION "${pyside_MAJOR_VERSION}")
+set(BINDING_API_MINOR_VERSION "${pyside_MINOR_VERSION}")
+set(BINDING_API_MICRO_VERSION "${pyside_MICRO_VERSION}")
+set(BINDING_API_PRE_RELEASE_VERSION_TYPE "${pyside_PRE_RELEASE_VERSION_TYPE}")
+set(BINDING_API_PRE_RELEASE_VERSION "${pyside_PRE_RELEASE_VERSION}")
# Detect if the Python interpreter is actually PyPy
execute_process(
@@ -58,14 +51,6 @@ execute_process(
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)
-# a - alpha, b - beta, rc - rc
-list(GET PYSIDE_VERSION_OUTPUT 3 BINDING_API_PRE_RELEASE_VERSION_TYPE)
-# the number of the pre release (alpha1, beta3, rc7, etc.)
-list(GET PYSIDE_VERSION_OUTPUT 4 BINDING_API_PRE_RELEASE_VERSION)
-
if(WIN32)
set(PATH_SEP "\;")
else()
diff --git a/sources/pyside6/pyside_version.py b/sources/pyside6/pyside_version.py
index b5ebfa59c..e2c5bfcb6 100644
--- a/sources/pyside6/pyside_version.py
+++ b/sources/pyside6/pyside_version.py
@@ -37,17 +37,17 @@
##
#############################################################################
-major_version = "6"
-minor_version = "0"
-patch_version = "0"
+major_version = "@pyside_MAJOR_VERSION@"
+minor_version = "@pyside_MINOR_VERSION@"
+patch_version = "@pyside_MICRO_VERSION@"
# For example: "a", "b", "rc"
# (which means "alpha", "beta", "release candidate").
# An empty string means the generated package will be an official release.
-release_version_type = "a"
+release_version_type = "@pyside_PRE_RELEASE_VERSION_TYPE@"
# For example: "1", "2" (which means "beta1", "beta2", if type is "b").
-pre_release_version = "1"
+pre_release_version = "@pyside_PRE_RELEASE_VERSION@"
if __name__ == '__main__':
# Used by CMake.