From 965961552d9dca07ee88e89c8a236afdda2d7a14 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 14 Mar 2022 09:09:48 +0100 Subject: [PATCH] [baseline] [python3] fix bz2(d) search on linux (#23525) * fix python3 ci? * add bz2d patch * fix extra spaces * version stuff --- ports/python3/0010-bz2d.patch | 19 +++++++++++++++++++ ports/python3/portfile.cmake | 3 +++ ports/python3/vcpkg.json | 3 ++- versions/baseline.json | 2 +- versions/p-/python3.json | 5 +++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ports/python3/0010-bz2d.patch diff --git a/ports/python3/0010-bz2d.patch b/ports/python3/0010-bz2d.patch new file mode 100644 index 0000000000..162cc7caba --- /dev/null +++ b/ports/python3/0010-bz2d.patch @@ -0,0 +1,19 @@ +diff --git a/setup.py b/setup.py +index 43e807f20..df4d43d3d 100644 +--- a/setup.py ++++ b/setup.py +@@ -1741,6 +1741,14 @@ def detect_compress_exts(self): + self.add(Extension('_bz2', ['_bz2module.c'], + libraries=['bz2'], + extra_link_args=bz2_extra_link_args)) ++ elif (self.compiler.find_library_file(self.lib_dirs, 'bz2d')): ++ if MACOS: ++ bz2_extra_link_args = ('-Wl,-search_paths_first',) ++ else: ++ bz2_extra_link_args = () ++ self.add(Extension('_bz2', ['_bz2module.c'], ++ libraries=['bz2d'], ++ extra_link_args=bz2_extra_link_args)) + else: + self.missing.append('_bz2') + diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 74733674c1..d99a0fd673 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -14,6 +14,7 @@ set(PATCHES 0004-dont-copy-vcruntime.patch 0005-only-build-required-projects.patch 0009-python.pc.patch + 0010-bz2d.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(PREPEND PATCHES 0001-static-library.patch) @@ -217,6 +218,8 @@ else() "--with-ensurepip" "--with-suffix=" "--with-system-expat" + "--without-readline" + "--disable-test-modules" ) if(VCPKG_TARGET_IS_OSX) list(APPEND OPTIONS "LIBS=-liconv -lintl") diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index a57226bdb1..1a2ec91100 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,6 +1,7 @@ { "name": "python3", - "version-semver": "3.10.2", + "version": "3.10.2", + "port-version": 1, "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "license": "Python-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index c6782a4d05..f9a31fcc42 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5574,7 +5574,7 @@ }, "python3": { "baseline": "3.10.2", - "port-version": 0 + "port-version": 1 }, "qca": { "baseline": "2.3.4", diff --git a/versions/p-/python3.json b/versions/p-/python3.json index 2ccde84c04..a89a02eb10 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4e348bd50d8c4252bda83903ce22f1e60d34be88", + "version": "3.10.2", + "port-version": 1 + }, { "git-tree": "0cf2e0bbf8fd712f82ed1997be82b136f1c13108", "version-semver": "3.10.2",