Skip to content

Commit fc2ae22

Browse files
committed
unix: patch packaging.tags in pip as well
Like setuptools, pip 20 also contains a copy of packaging.tags that needs to be taught how to react when running from a statically linked binary. Closes #30.
1 parent cb4b4b9 commit fc2ae22

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,22 @@ diff --git a/src/pip/_internal/utils/glibc.py b/src/pip/_internal/utils/glibc.py
197197
gnu_get_libc_version = process_namespace.gnu_get_libc_version
198198
except AttributeError:
199199
200+
diff --git a/src/pip/_vendor/packaging/tags.py b/src/pip/_vendor/packaging/tags.py
201+
index 60a69d8..08c0597 100644
202+
--- a/src/pip/_vendor/packaging/tags.py
203+
+++ b/src/pip/_vendor/packaging/tags.py
204+
@@ -466,7 +466,10 @@ def _glibc_version_string_ctypes():
205+
# which libc our process is actually using.
206+
#
207+
# Note: typeshed is wrong here so we are ignoring this line.
208+
- process_namespace = ctypes.CDLL(None) # type: ignore
209+
+ try:
210+
+ process_namespace = ctypes.CDLL(None) # type: ignore
211+
+ except OSError:
212+
+ return None
213+
try:
214+
gnu_get_libc_version = process_namespace.gnu_get_libc_version
215+
except AttributeError:
200216
EOF
201217

202218
${ROOT}/out/python/install/bin/python3 setup.py install

0 commit comments

Comments
 (0)