diff options
author | H. Vetinari <h.vetinari@gmx.com> | 2021-12-10 16:11:36 +1100 |
---|---|---|
committer | H. Vetinari <h.vetinari@gmx.com> | 2021-12-10 16:15:11 +1100 |
commit | 812edadfd8f3e267e8c94893ffc55aec4947030b (patch) | |
tree | 51cd5798aca81839770ea9e52997ced6f18e792e /numpy/testing/_private/utils.py | |
parent | 40c0c834b43a825d3e914e02c6a4302360e5dec3 (diff) | |
download | numpy-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.py | 13 |
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) |