summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.py
diff options
context:
space:
mode:
authorH. Vetinari <h.vetinari@gmx.com>2021-12-10 16:11:36 +1100
committerH. Vetinari <h.vetinari@gmx.com>2021-12-10 16:15:11 +1100
commit812edadfd8f3e267e8c94893ffc55aec4947030b (patch)
tree51cd5798aca81839770ea9e52997ced6f18e792e /numpy/testing/_private/utils.py
parent40c0c834b43a825d3e914e02c6a4302360e5dec3 (diff)
downloadnumpy-812edadfd8f3e267e8c94893ffc55aec4947030b.tar.gz
move get_glibc_version to np.testing; skip 2 more tests for old glibc
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r--numpy/testing/_private/utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index 0eb945d15..2c71e45bd 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -2518,3 +2518,16 @@ def _no_tracing(func):
finally:
sys.settrace(original_trace)
return wrapper
+
+
+def _get_glibc_version():
+ try:
+ ver = os.confstr('CS_GNU_LIBC_VERSION').rsplit(' ')[1]
+ except Exception as inst:
+ ver = '0.0'
+
+ return ver
+
+
+_glibcver = _get_glibc_version()
+_glibc_older_than = lambda x: (_glibcver != '0.0' and _glibcver < x)