From 07b9b56b7857573a7381038df87ae9c45efbd364 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 21 Nov 2023 16:41:11 +0100 Subject: [PATCH] Add Python 3.13 to cmake config --- Add-Python-3.13-to-cmake-config.patch | 53 +++++++++++++++++++++++++++ opentrep.spec | 9 ++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 Add-Python-3.13-to-cmake-config.patch diff --git a/Add-Python-3.13-to-cmake-config.patch b/Add-Python-3.13-to-cmake-config.patch new file mode 100644 index 0000000..122d220 --- /dev/null +++ b/Add-Python-3.13-to-cmake-config.patch @@ -0,0 +1,53 @@ +From 9cd40162b44cba25f9a489e48f4301627b0591ac Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Tue, 21 Nov 2023 16:07:05 +0100 +Subject: [PATCH] Add Python 3.13 to cmake config + +--- + config/FindPython/Support.cmake | 2 +- + config/FindPythonInterp.cmake | 2 +- + config/FindPythonLibs.cmake | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/FindPython/Support.cmake b/config/FindPython/Support.cmake +index 517ac21..b62f536 100644 +--- a/config/FindPython/Support.cmake ++++ b/config/FindPython/Support.cmake +@@ -28,7 +28,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) + message (FATAL_ERROR "FindPython: INTERNAL ERROR") + endif() + if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3") +- set(_${_PYTHON_PREFIX}_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++ set(_${_PYTHON_PREFIX}_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2") + set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) + else() +diff --git a/config/FindPythonInterp.cmake b/config/FindPythonInterp.cmake +index 7ad3587..e6dd298 100644 +--- a/config/FindPythonInterp.cmake ++++ b/config/FindPythonInterp.cmake +@@ -54,7 +54,7 @@ unset(_Python_NAMES) + + set(_PYTHON1_VERSIONS 1.6 1.5) + set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(PythonInterp_FIND_VERSION) + if(PythonInterp_FIND_VERSION_COUNT GREATER 1) +diff --git a/config/FindPythonLibs.cmake b/config/FindPythonLibs.cmake +index 43a84dd..8dfd060 100644 +--- a/config/FindPythonLibs.cmake ++++ b/config/FindPythonLibs.cmake +@@ -79,7 +79,7 @@ set(CMAKE_FIND_FRAMEWORK LAST) + + set(_PYTHON1_VERSIONS 1.6 1.5) + set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(PythonLibs_FIND_VERSION) + if(PythonLibs_FIND_VERSION_COUNT GREATER 1) +-- +2.41.0 + diff --git a/opentrep.spec b/opentrep.spec index a83f038..1ec48ef 100644 --- a/opentrep.spec +++ b/opentrep.spec @@ -4,7 +4,7 @@ # Name: opentrep Version: 0.07.13 -Release: 4%{?dist} +Release: 5%{?dist} Summary: C++ library providing a clean API for parsing travel-focused requests @@ -14,6 +14,9 @@ License: LGPLv2+ and BSD URL: https://github.com/trep/%{name} Source0: %{url}/archive/%{name}-%{version}.tar.gz +# https://github.com/trep/opentrep/pull/19 +Patch0: Add-Python-3.13-to-cmake-config.patch + BuildRequires: gcc-c++ %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: cmake @@ -116,6 +119,7 @@ and it is therefore not reliable. %prep %setup -q -n %{name}-%{name}-%{version} +%patch 0 -p1 %build %cmake @@ -197,6 +201,9 @@ rm -f %{_bindir}/py%{name} %endif %changelog +* Tue Nov 21 2023 Karolina Surma - 0.07.13-5 +- Add Python 3.13 to cmake config + * Thu Jul 20 2023 Fedora Release Engineering - 0.07.13-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild