]> git.pld-linux.org Git - packages/mongo-c-driver.git/commitdiff
- switch to Python 3 master
authorMarcin Krol <hawk@tld-linux.org>
Tue, 18 Jul 2023 20:01:57 +0000 (22:01 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 18 Jul 2023 20:01:57 +0000 (22:01 +0200)
mongo-c-driver.spec
python3.patch [new file with mode: 0644]

index 1c4dbf107c1ffecdf618e3942aa3e7a0a891de3d..f053fc9178df98df0891fd7f96c84a883724c115 100644 (file)
@@ -21,13 +21,14 @@ Group:              Libraries
 #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
@@ -131,6 +132,7 @@ Dokumentacja API biblioteki libbson.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %cmake -B cmake-build \
diff --git a/python3.patch b/python3.patch
new file mode 100644 (file)
index 0000000..ccdb026
--- /dev/null
@@ -0,0 +1,17 @@
+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
This page took 0.171656 seconds and 4 git commands to generate.