From 812edadfd8f3e267e8c94893ffc55aec4947030b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 10 Dec 2021 16:11:36 +1100 Subject: move get_glibc_version to np.testing; skip 2 more tests for old glibc --- numpy/testing/_private/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'numpy/testing/_private/utils.py') 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) -- cgit v1.2.1