We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4211775 commit 36014e6Copy full SHA for 36014e6
src/pip/_internal/utils/glibc.py
@@ -17,9 +17,12 @@ def glibc_version_string_confstr() -> Optional[str]:
17
if sys.platform == "win32":
18
return None
19
try:
20
+ gnu_libc_version = os.confstr("CS_GNU_LIBC_VERSION")
21
+ if gnu_libc_version is None:
22
+ return None
23
# os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17":
- _, version = os.confstr("CS_GNU_LIBC_VERSION").split() # type: ignore
- except (AttributeError, OSError, ValueError):
24
+ _, version = gnu_libc_version
25
+ except (OSError, ValueError):
26
# os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
27
28
return version
0 commit comments