8000 BUG: Fixes for building on Cygwin. by charris · Pull Request #18102 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fixes for building on Cygwin. #18102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1926a6b
BLD: Move the configuration defines in Python.h earlier.
DWesl May 14, 2020
7c320f3
DEV: Try to rebase f2py-created modules for fewer fork() failures in …
DWesl May 14, 2020
9cbd7de
TST: Mark the tests that seem to fail due to different floating-point…
DWesl May 14, 2020
60d1964
TST: Try to mark the tests still suseptible to fork() failures on cyg…
DWesl May 14, 2020
6d8f36e
DEV: Revert executable renames for F77/G77 compiler.
DWesl May 18, 2020
c8d1059
BLD: Add functions that fail tests on Cygwin to npy_config.h.
DWesl May 18, 2020
c356079
TST: Describe what I know about the FPE test failure.
DWesl May 18, 2020
faca5fb
STY: A few largely cosmetic changes.
DWesl May 18, 2020
02593e2
DEV: Stop trying to rebase f2py modules.
DWesl May 18, 2020
db30000
Remove xfails from tests that now pass.
DWesl May 19, 2020
66dc53a
Use parametrize for the dtypes in the abs tests.
DWesl May 19, 2020
0d4b4de
Remove xfail mark from an assert function.
DWesl May 20, 2020
0f11301
Remove references to np.complex256
DWesl May 25, 2020
bc209f1
Remove reference to np.complex256 in the other test
DWesl May 25, 2020
c93cb73
Don't add `gfortran` to the list of GNU77 compilers
DWesl May 29, 2020
343127d
Include only 'gfortran' in gnu fcompiler, not absolute version
DWesl Jun 6, 2020
f9bea44
TST: Use usual names for the dtypes in xfail mark
DWesl Jul 9, 2020
f655535
BLD: Remind GCC that .seh_savexmm fails for xmm16-31.
DWesl Jun 17, 2020
d22b665
BLD: Fix code checking for old GCC on cygwin.
DWesl Jun 19, 2020
8e2352b
TST: Only mark fork()-using tests xfail on 32-bit cygwin.
DWesl Jun 19, 2020
c519dd0
BLD: Fix flags added to compiler line for old GCC on MS.
DWesl Jun 19, 2020
33e863b
TST: parametrize test_npymath_complex.
DWesl Jul 9, 2020
853f82a
TST: Clarify the xfail messages for branch cuts.
DWesl Aug 29, 2020
c32f1ce
BLD: Remove probably-unnecessary include.
DWesl Aug 29, 2020
31c1fe1
TST: Try to keep testing code from changing tempfile name.
DWesl Aug 23, 2020
3666fce
BLD: Mark modfl as problematic on cygwin.
DWesl Aug 29, 2020
78e8c95
Undef HAVE_MODFL only on 64-bit cygwin
DWesl Sep 1, 2020
af0de3d
Revert "BLD: Fix flags added to compiler line for old GCC on MS."
DWesl Oct 27, 2020
8fc9a9f
Revert "BLD: Fix code checking for old GCC on cygwin."
DWesl Oct 27, 2020
7c43e16
Revert "BLD: Remind GCC that .seh_savexmm fails for xmm16-31."
DWesl Oct 27, 2020
0c93f5f
MAINT: Fixup setpy.py merge
charris Dec 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
< 8000 /div>
Diff view
Prev Previous commit
Next Next commit
TST: Mark the tests that seem to fail due to different floating-point…
… on cygwin.

Most likely I should be testing for newlib (the C runtime, roughly
takes the place of glibc, I think), not cygwin (the emulation layer on
Windows), but I have no idea how to do that from within python.  If
someone working on embedded systems runs into this issue, this
hopefully gives them some idea where to start.
  • Loading branch information
DWesl authored and charris committed Dec 31, 2020
commit 9cbd7de5958b1b285be138c2ec45e3bf28dda9ae
8000
6 changes: 6 additions & 0 deletions numpy/core/tests/test_multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -8576,6 +8576,9 @@ class MyAlwaysEqualNew(MyAlwaysEqual):
assert_equal(array != my_always_equal, 'ne')


@pytest.mark.xfail(sys.platform == 'cygwin',
reason='abs(inf+nanj) short-circuits to inf',
strict=True)
def test_npymath_complex():
# Smoketest npymath functions
from numpy.core._multiarray_tests import (
Expand All @@ -8595,6 +8598,9 @@ def test_npymath_complex():
assert_allclose(got, expected)


@pytest.mark.xfail(sys.platform == 'cygwin',
reason='expects cosh(-inf) == -inf',
strict=True)
def test_npymath_real():
# Smoketest npymath functions
from numpy.core._multiarray_tests import (
Expand Down
6 changes: 6 additions & 0 deletions numpy/core/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ def test_errobj_noerrmask(self):


class TestFloatExceptions:
@pytest.mark.xfail(sys.platform == 'cygwin',
reason='FPE support incomplete',
strict=True)
def assert_raises_fpe(self, fpeerr, flop, x, y):
ftype = type(x)
try:
Expand All @@ -636,6 +639,9 @@ def assert_op_raises_fpe(self, fpeerr, flop, sc1, sc2):
self.assert_raises_fpe(fpeerr, flop, sc1, sc2[()])
self.assert_raises_fpe(fpeerr, flop, sc1[()], sc2[()])

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='FPE support incomplete',
strict=True)
def test_floating_exceptions(self):
# Test basic arithmetic function errors
with np.errstate(all='raise'):
Expand Down
4 changes: 4 additions & 0 deletions numpy/core/tests/test_scalarmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,13 @@ def _test_abs_func(self, absfunc):
x = tp(np.finfo(tp).min)
assert_equal(absfunc(x), -x.real)

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='abs(np.complex256.max) overflows')
def test_builtin_abs(self):
self._test_abs_func(abs)

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='abs(np.complex256.max) overflows')
def test_numpy_abs(self):
self._test_abs_func(np.abs)

Expand Down
12 changes: 12 additions & 0 deletions numpy/core/tests/test_umath.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,9 @@ def test_log2_values(self):
yf = np.array(y, dtype=dt)
assert_almost_equal(np.log2(xf), yf)

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='Fails for i==29',
strict=True)
def test_log2_ints(self):
# a good log2 implementation should provide this,
# might fail on OS with bad libm
Expand Down Expand Up @@ -3011,6 +3014,9 @@ def test_precisions_consistent(self):
assert_almost_equal(fcf, fcd, decimal=6, err_msg='fch-fcd %s' % f)
assert_almost_equal(fcl, fcd, decimal=15, err_msg='fch-fcl %s' % f)

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='0.7071j != 0.7071j, apparently',
strict=True)
def test_branch_cuts(self):
# check branch cuts and continuity on them
_check_branch_cut(np.log, -0.5, 1j, 1, -1, True)
Expand All @@ -3036,6 +3042,9 @@ def test_branch_cuts(self):
_check_branch_cut(np.arccosh, [0-2j, 2j, 2], [1, 1, 1j], 1, 1)
_check_branch_cut(np.arctanh, [0-2j, 2j, 0], [1, 1, 1j], 1, 1)

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='square root faces small loss of precision',
strict=True)
def test_branch_cuts_complex64(self):
# check branch cuts and continuity on them
_check_branch_cut(np.log, -0.5, 1j, 1, -1, True, np.complex64)
Expand Down Expand Up @@ -3080,6 +3089,9 @@ def test_against_cmath(self):
b = cfunc(p)
assert_(abs(a - b) < atol, "%s %s: %s; cmath: %s" % (fname, p, a, b))

@pytest.mark.xfail(sys.platform == 'cygwin',
reason='arcsinh(1e-20) returns 0',
strict=True)
@pytest.mark.parametrize('dtype', [np.complex64, np.complex_, np.longcomplex])
def test_loss_of_precision(self, dtype):
"""Check loss of precision in complex arc* functions"""
Expand Down
0