#Source0Download: https://github.com/mongodb/mongo-c-driver/releases/
Source0: https://github.com/mongodb/mongo-c-driver/releases/download/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 8e88d6d3b5360d81ce61e98fce27df94
+Patch0: python3.patch
URL: https://github.com/mongodb/mongo-c-driver
BuildRequires: cmake >= 3.15
%{?with_sasl:BuildRequires: cyrus-sasl-devel}
BuildRequires: libicu-devel
%{?with_ssl:BuildRequires: openssl-devel}
BuildRequires: pkgconfig
-BuildRequires: python
+BuildRequires: python3 >= 1:3.2
BuildRequires: snappy-devel
%{?with_doc:BuildRequires: sphinx-pdg}
BuildRequires: zlib-devel >= 1.2.12
%prep
%setup -q
+%patch0 -p1
%build
%cmake -B cmake-build \
--- /dev/null
+diff -ur mongo-c-driver-1.24.1.orig/CMakeLists.txt mongo-c-driver-1.24.1/CMakeLists.txt
+--- mongo-c-driver-1.24.1.orig/CMakeLists.txt 2023-06-21 14:31:37.000000000 +0200
++++ mongo-c-driver-1.24.1/CMakeLists.txt 2023-07-18 21:59:49.333339128 +0200
+@@ -240,10 +240,10 @@
+ file (STRINGS ${PROJECT_SOURCE_DIR}/VERSION_CURRENT BUILD_VERSION)
+ message (STATUS "file VERSION_CURRENT contained BUILD_VERSION ${BUILD_VERSION}")
+ else ()
+- find_package (PythonInterp)
+- if (PYTHONINTERP_FOUND)
++ find_package (Python3 3.2 REQUIRED)
++ if (Python3_FOUND)
+ execute_process (
+- COMMAND ${PYTHON_EXECUTABLE} build/calc_release_version.py
++ COMMAND ${Python3_EXECUTABLE} build/calc_release_version.py
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE CALC_RELEASE_VERSION
+ RESULT_VARIABLE CALC_RELEASE_VERSION_RESULT