mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
cython: disable tests that fail when built against libc++
This commit is contained in:
parent
095095c479
commit
e4574a54d4
15
pkgs/development/python-modules/cython_test.patch
Normal file
15
pkgs/development/python-modules/cython_test.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/tests/run/numpy_math.pyx b/tests/run/numpy_math.pyx
|
||||
index eafd23a..4a15522 100644
|
||||
--- a/tests/run/numpy_math.pyx
|
||||
+++ b/tests/run/numpy_math.pyx
|
||||
@@ -37,8 +37,8 @@ def test_fp_classif():
|
||||
assert not npmath.isnan(d_zero)
|
||||
assert not npmath.isnan(f_zero)
|
||||
|
||||
- assert npmath.isinf(npmath.INFINITY) == 1
|
||||
- assert npmath.isinf(-npmath.INFINITY) == -1
|
||||
+ assert npmath.isinf(npmath.INFINITY) != 0
|
||||
+ assert npmath.isinf(-npmath.INFINITY) != 0
|
||||
assert npmath.isnan(npmath.NAN)
|
||||
|
||||
assert npmath.signbit(npmath.copysign(1., -1.))
|
@ -4146,9 +4146,16 @@ in {
|
||||
# For testing
|
||||
nativeBuildInputs = with self; [ numpy pkgs.ncurses ];
|
||||
|
||||
# cython's testsuite requires npy_isinf to return sign of the infinity, but
|
||||
# a C99 conformant is only required to return a non zero value
|
||||
patches = [ ../development/python-modules/cython_test.patch ];
|
||||
|
||||
# cython's testsuite is not working very well with libc++
|
||||
# We are however optimistic about things outside of testsuite still working
|
||||
checkPhase = ''
|
||||
export HOME="$NIX_BUILD_TOP"
|
||||
${python.interpreter} runtests.py
|
||||
${python.interpreter} runtests.py \
|
||||
${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user