From fb6db033ed4fc205071c4fd024162be5866d8d42 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 22 May 2020 16:37:20 +0100 Subject: [PATCH] Do not link Python extensions to libpython Boost upstream does not link Boost.Python libraries to libpython, which matches the advice from Python upstream as well. Drop the Fedora patches which cause libpython to be linked to. Those patches have been causing problems for a while anyway. --- boost-1.57.0-python-libpython_dep.patch | 13 ------ boost-1.66.0-python-abi_letters.patch | 62 ------------------------- boost.spec | 9 +--- 3 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 boost-1.57.0-python-libpython_dep.patch delete mode 100644 boost-1.66.0-python-abi_letters.patch diff --git a/boost-1.57.0-python-libpython_dep.patch b/boost-1.57.0-python-libpython_dep.patch deleted file mode 100644 index 57bfc26..0000000 --- a/boost-1.57.0-python-libpython_dep.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: boost_1_57_0/tools/build/src/tools/python.jam -=================================================================== ---- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406) -+++ boost_1_57_0/tools/build/src/tools/python.jam (working copy) -@@ -994,7 +994,7 @@ - else - { - alias python_for_extensions -- : -+ : python - : $(target-requirements) - : - : $(usage-requirements) diff --git a/boost-1.66.0-python-abi_letters.patch b/boost-1.66.0-python-abi_letters.patch deleted file mode 100644 index a421a75..0000000 --- a/boost-1.66.0-python-abi_letters.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200 -+++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200 -@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti - # using python : 2.3 : /usr/local/bin/python ; - # - rule init ( version ? : cmd-or-prefix ? : includes * : libraries ? -- : condition * : extension-suffix ? ) -+ : condition * : extension-suffix ? : abi-letters ? ) - { - project.push-current $(.project) ; - -@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ? - } - } - -- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ; -+ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ; - - project.pop-current ; - } -@@ -653,7 +653,7 @@ local rule system-library-dependencies ( - - # Declare a target to represent Python's library. - # --local rule declare-libpython-target ( version ? : requirements * ) -+local rule declare-libpython-target ( version ? : requirements * : abi-letters ? ) - { - # Compute the representation of Python version in the name of Python's - # library file. -@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve - } - - # Declare it. -- lib python.lib : : python$(lib-version) $(requirements) ; -+ lib python.lib : : python$(lib-version)$(abi-letters) $(requirements) ; - } - - - # Implementation of init. - local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : -- condition * : extension-suffix ? ) -+ condition * : extension-suffix ? : abi-letters ? ) - { - local prefix ; - local exec-prefix ; -@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o - extension-suffix ?= _d ; - } - extension-suffix ?= "" ; -+ abi-letters ?= "" ; - - local cmds-to-try ; - -@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o - } - else - { -- declare-libpython-target $(version) : $(target-requirements) ; -+ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ; - - # This is an evil hack. On, Windows, when Python is embedded, nothing - # seems to set up sys.path to include Python's standard library diff --git a/boost.spec b/boost.spec index 9eee060..5145f8a 100644 --- a/boost.spec +++ b/boost.spec @@ -134,10 +134,6 @@ Patch15: boost-1.58.0-pool.patch # https://svn.boost.org/trac/boost/ticket/9038 Patch51: boost-1.58.0-pool-test_linking.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1102667 -Patch61: boost-1.57.0-python-libpython_dep.patch -Patch62: boost-1.66.0-python-abi_letters.patch - # https://bugzilla.redhat.com/show_bug.cgi?id=1190039 Patch65: boost-1.66.0-build-optflags.patch @@ -650,8 +646,6 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch5 -p1 %patch15 -p0 %patch51 -p1 -%patch61 -p1 -%patch62 -p1 %patch65 -p1 %patch82 -p1 %patch83 -p1 @@ -688,7 +682,7 @@ EOF %if %{with python3} cat >> ./tools/build/src/user-config.jam << EOF -using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}${PYTHON3_ABIFLAGS} : : : : ${PYTHON3_ABIFLAGS} ; +using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}${PYTHON3_ABIFLAGS} : : : ; EOF %endif @@ -1248,6 +1242,7 @@ fi %changelog * Fri May 22 2020 Jonathan Wakely - 1.69.0-20 - Require boost-python3 for boost, fold boost-python3-devel into boost-devel +- Do not link Python extensions to libpython * Fri May 15 2020 Pete Walter - 1.69.0-19 - Rebuild for ICU 67