Patch Boost.Python for Python 3.10 - replace _Py_fopen() with fopen() (#1912903)
This commit is contained in:
parent
64d97f19ff
commit
ddd384021b
29
boost-1.73-python3.10-Py_fopen.patch
Normal file
29
boost-1.73-python3.10-Py_fopen.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From ba90b0adffb5fedc894889b0962c22fff5bb748d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||||
|
Date: Thu, 7 Jan 2021 11:46:29 +0100
|
||||||
|
Subject: [PATCH] fix Boost with Python 3.10
|
||||||
|
|
||||||
|
---
|
||||||
|
src/exec.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/exec.cpp b/src/exec.cpp
|
||||||
|
index 171c6f41..caa7d086 100644
|
||||||
|
--- a/libs/python/src/exec.cpp
|
||||||
|
+++ b/libs/python/src/exec.cpp
|
||||||
|
@@ -106,10 +106,10 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l
|
||||||
|
char *f = const_cast<char *>(filename);
|
||||||
|
// Let python open the file to avoid potential binary incompatibilities.
|
||||||
|
#if PY_VERSION_HEX >= 0x03040000
|
||||||
|
- FILE *fs = _Py_fopen(f, "r");
|
||||||
|
+ FILE *fs = fopen(f, "r");
|
||||||
|
#elif PY_VERSION_HEX >= 0x03000000
|
||||||
|
PyObject *fo = Py_BuildValue("s", f);
|
||||||
|
- FILE *fs = _Py_fopen(fo, "r");
|
||||||
|
+ FILE *fs = fopen(fo, "r");
|
||||||
|
Py_DECREF(fo);
|
||||||
|
#else
|
||||||
|
PyObject *pyfile = PyFile_FromString(f, const_cast<char*>("r"));
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -42,7 +42,7 @@ Name: boost
|
|||||||
%global real_name boost
|
%global real_name boost
|
||||||
Summary: The free peer-reviewed portable C++ source libraries
|
Summary: The free peer-reviewed portable C++ source libraries
|
||||||
Version: 1.73.0
|
Version: 1.73.0
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
License: Boost and MIT and Python
|
License: Boost and MIT and Python
|
||||||
|
|
||||||
# Replace each . with _ in %%{version}
|
# Replace each . with _ in %%{version}
|
||||||
@ -175,6 +175,9 @@ Patch93: boost-1.73-python3.10.patch
|
|||||||
# https://github.com/boostorg/locale/issues/52
|
# https://github.com/boostorg/locale/issues/52
|
||||||
Patch94: boost-1.73-locale-empty-vector.patch
|
Patch94: boost-1.73-locale-empty-vector.patch
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1912903
|
||||||
|
Patch95: boost-1.73-python3.10-Py_fopen.patch
|
||||||
|
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%bcond_with docs_generated
|
%bcond_with docs_generated
|
||||||
|
|
||||||
@ -693,6 +696,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x
|
|||||||
%patch92 -p1
|
%patch92 -p1
|
||||||
%patch93 -p1
|
%patch93 -p1
|
||||||
%patch94 -p1
|
%patch94 -p1
|
||||||
|
%patch95 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
@ -1304,6 +1308,9 @@ fi
|
|||||||
%{_mandir}/man1/b2.1*
|
%{_mandir}/man1/b2.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 8 14:14:00 CET 2021 Tomas Hrnciar <thrnciar@redhat.com> - 1.73.0-12
|
||||||
|
- Patch Boost.Python for Python 3.10 - replace _Py_fopen() with fopen() (#1912903)
|
||||||
|
|
||||||
* Fri Nov 20 2020 Jonathan Wakely <jwakely@redhat.com> - 1.73.0-11
|
* Fri Nov 20 2020 Jonathan Wakely <jwakely@redhat.com> - 1.73.0-11
|
||||||
- Patch Boost.Locale to not access empty vector (#1899888)
|
- Patch Boost.Locale to not access empty vector (#1899888)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user