Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[baseline] [python3] fix bz2(d) search on linux #23525

Merged
merged 4 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ports/python3/0010-bz2d.patch
Original file line number Diff line number Diff line change
@@ -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')

3 changes: 3 additions & 0 deletions ports/python3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5574,7 +5574,7 @@
},
"python3": {
"baseline": "3.10.2",
"port-version": 0
"port-version": 1
},
"qca": {
"baseline": "2.3.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/python3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4e348bd50d8c4252bda83903ce22f1e60d34be88",
"version": "3.10.2",
"port-version": 1
},
{
"git-tree": "0cf2e0bbf8fd712f82ed1997be82b136f1c13108",
"version-semver": "3.10.2",
Expand Down