Skip to content

Commit

Permalink
Merge pull request #4765 from pradyunsg/misc/remove-platform-glibc
Browse files Browse the repository at this point in the history
Stop depending on platform.libc_ver()
  • Loading branch information
dstufft committed Oct 4, 2017
2 parents 90f64b4 + 9ac0220 commit ae7bbee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pip/_internal/utils/glibc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import absolute_import

import ctypes
import platform
import re
import warnings

Expand Down Expand Up @@ -73,9 +72,13 @@ def have_compatible_glibc(required_major, minimum_minor):
# misleading. Solution: instead of using platform, use our code that actually
# works.
def libc_ver():
"""Try to determine the glibc version
Returns a tuple of strings (lib, version) which default to empty strings
in case the lookup fails.
"""
glibc_version = glibc_version_string()
if glibc_version is None:
# For non-glibc platforms, fall back on platform.libc_ver
return platform.libc_ver()
return ("", "")
else:
return ("glibc", glibc_version)

0 comments on commit ae7bbee

Please sign in to comment.