8000 Add 64-bit Windows wheels [wheel build] · lithomas1/numpy@bf8d234 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf8d234

Browse files
committed
Add 64-bit Windows wheels [wheel build]
commit 30228578ac65ec6b90961700a5783c23d8e1b879 Author: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Wed Nov 17 16:21:27 2021 -0800 Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Update LICENSE_win32.txt Update LICENSE_win32.txt Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Update LICENSE_win32.txt Update LICENSE_win32.txt Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Update LICENSE_win32.txt Update LICENSE_win32.txt Add Windows config to GHA update script [wheel build] typo [wheel build] fix typo? [wheel build] fix linux builds? [wheel build] typo [wheel build] add license and pin to windows 2016 skip tests [wheel build] pin to windows 2019 instead [wheel build] try to find out the error on windows [wheel build] maybe fix? [wheel build] maybe fix? [wheel build] fix? [wheel build] cleanup [wheel build] Update LICENSE_win32.txt Update LICENSE_win32.txt commit 4bd12df Author: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Mon Nov 15 17:28:47 2021 -0800 # This is a combination of 14 commits. # This is the 1st commit message: Add Windows config to GHA # This is the commit message numpy#2: update script [wheel build] # This is the commit message numpy#3: typo [wheel build] # This is the commit message numpy#4: fix typo? [wheel build] # This is the commit message numpy#5: fix linux builds? [wheel build] # This is the commit message numpy#6: typo [wheel build] # This is the commit message numpy#7: add license and pin to windows 2016 # This is the commit message numpy#8: skip tests [wheel build] # This is the commit message numpy#9: pin to windows 2019 instead [wheel build] # This is the commit message numpy#10: try to find out the error on windows [wheel build] # This is the commit message numpy#11: maybe fix? [wheel build] # This is the commit message numpy#12: maybe fix? [wheel build] # This is the commit message numpy#13: fix? [wheel build] # This is the commit message numpy#14: cleanup [wheel build] commit 444a721 Merge: 376ad69 22448b4 Author: Charles Harris <charlesr.harris@gmail.com> Date: Mon Nov 15 17:47:23 2021 -0700 Merge pull request numpy#20274 from h-vetinari/fix_15179 TST: Some fixes & refactoring around glibc-dependent skips in test_umath.py commit 376ad69 Merge: b75fe57 546c47a Author: Charles Harris <charlesr.harris@gmail.com> Date: Mon Nov 15 17:31:41 2021 -0700 Merge pull request numpy#20327 from seberg/rename-interpolation BUG,DEP: Fixup quantile/percentile and rename interpolation->method commit 546c47a Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 15 16:13:50 2021 -0600 DOC: Fixups for interpolation rename comments from review Co-authored-by: Charles Harris <charlesr.harris@gmail.com> commit b75fe57 Merge: 7310c09 cbc25d2 Author: Warren Weckesser <warren.weckesser@gmail.com> Date: Mon Nov 15 17:27:08 2021 -0500 Merge pull request numpy#20369 from bilderbuchi/missing_diagnostics_newlines MAINT: Fix newlines in diagnostics output of numpy.f2py. commit cbc25d2 Author: Christoph Buchner <bilderbuchi@phononoia.at> Date: Sun Nov 14 08:36:03 2021 +0100 MAINT: Fix newlines in diagnostics output of numpy.f2py. Linebreaks were not consistently added to errmess/outmess arguments, which led to very long lines and wrong concatenation with compiler messages in f2py console output. commit be15716 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Fri Nov 12 12:10:20 2021 -0600 DOC: Add release not for quantile `interpolation` rename Also updates the old release note to include the info (and generally tweaks it a bit) commit 7d8a8e7 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Fri Nov 12 11:57:22 2021 -0600 DOC: Update percentile/quantile docs Mainly fixes the method list slightly, tones down the warning a bit and fixes the link to the paper (I did not realize that the link failed to work due only because the reference was missing from nanquantile/nanpercentile). commit 5bd71fb Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Tue Nov 9 09:48:59 2021 -0600 DOC: Add ticks to quantile interpolation/method error Co-authored-by: abel <aoun@cerfacs.fr> commit 0d5fb81 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 20:39:50 2021 -0600 DOC: Remove reference to paper from quantile `method` kwarg Apparently, sphinx does not resolve references to footnotes from parameter descriptions. commit 8437663 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 18:25:37 2021 -0600 MAINT: Rename interpolation to method in percentile stubs commit 8cfb6b5 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 16:47:27 2021 -0600 TST: Add deprecation testcase for quantile interpolation rename commit a5ac5a5 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 16:41:24 2021 -0600 DOC: Fixup the percentile methods plot commit 85f3dda Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 16:37:41 2021 -0600 BUG: quantile discrete methods ended up using -1 as index sometimes Also, the closest-observation did not correctly support multiple quantiles calculated at the same time (broadcasting error). commit 3993408 Author: Sebastian Berg <sebastian@sipsolutions.net> Date: Mon Nov 8 15:38:30 2021 -0600 API,DEP: Rename percentile/quantile `interpolation=` to `method=` commit 22448b4 Author: H. Vetinari <h.vetinari@gmx.com> Date: Tue Nov 2 16:51:59 2021 +1100 TST: parametrize glibc-version check in test_umath.py commit 12923c2 Author: H. Vetinari <h.vetinari@gmx.com> Date: Tue Nov 2 14:21:01 2021 +1100 TST: skip coverage of large elements in sincos_float32 for ancient glibc Fixes numpy#15179 commit 56268d5 Author: H. Vetinari <h.vetinari@gmx.com> Date: Tue Nov 2 14:19:24 2021 +1100 TST: use existence of glibc-version to clean up a test commit 01443e8 Author: H. Vetinari <h.vetinari@gmx.com> Date: Tue Nov 2 14:18:52 2021 +1100 TST: turn glibc_older_than_2.17 into boolean instead of xfail this anticipates reuse of this boolean within the test module
1 parent 7310c09 commit bf8d234

File tree

16 files changed

+1360
-279
lines changed

16 files changed

+1360
-279
lines changed

.github/workflows/wheels.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ jobs:
7070
- os: macos-latest
7171
python: "310"
7272
platform: macosx_x86_64
73+
74+
# Windows builds
75+
- os: windows-2019
76+
python: "38"
77+
platform: win_amd64
78+
- os: windows-2019
79+
python: "39"
80+
platform: win_amd64
81+
- os: windows-2019
82+
python: "310"
83+
platform: win_amd64
7384

7485
steps:
7586
- name: Checkout numpy
@@ -91,9 +102,13 @@ jobs:
91102
CIBW_ENVIRONMENT_LINUX: CFLAGS='-std=c99 -fno-strict-aliasing'
92103
LDFLAGS='-Wl,--strip-debug'
93104
OPENBLAS64_=/usr/local
105+
RUNNER_OS='Linux'
94106
# MACOS linker doesn't support stripping symbols
95107
CIBW_ENVIRONMENT_MACOS: CFLAGS='-std=c99 -fno-strict-aliasing'
96108
OPENBLAS64_=/usr/local
109+
# Hardcode for now,blas stuff needs changes for 32-bit
110+
CIBW_ENVIRONMENT_WINDOWS: NPY_USE_BLAS_ILP64=1
111+
OPENBLAS64_=openblas
97112
CIBW_BUILD_VERBOSITY: 3
98113
CIBW_BEFORE_BUILD: bash {project}/tools/wheels/cibw_before_build.sh {project}
99114
CIBW_BEFORE_TEST: pip install -r {project}/test_requirements.txt
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
Add new linear interpolation methods for ``quantile`` and ``percentile``
2-
------------------------------------------------------------------------
1+
Add new methods for ``quantile`` and ``percentile``
2+
---------------------------------------------------
33

4-
``quantile`` and ``percentile`` now have 13 linear interpolation methods,
5-
nine of which can be found in the scientific literature.
6-
The remaining methods are NumPy specific and are kept for backwards
7-
compatibility. The default is "inclusive" (method 7), whose behavior is equivalent
8-
to the former default "linear".
4+
``quantile`` and ``percentile`` now have have a ``method=``
5+
keyword argument supporting 13 different methods.
6+
This replaces the ``interpolation=`` keyword argument.
7+
8+
The methods are now aligned with nine methods which can be
9+
found in scientific literature and the R language.
10+
The remaining methods are the previous discontinuous variations
11+
of the default "linear" one.
12+
13+
Please see the documentation of `numpy.percentile` for more information.

numpy/core/tests/test_deprecations.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,3 +1230,23 @@ def test_deprecated_module(self):
12301230
def test_deprecated_attr(self):
12311231
finfo = np.finfo(float)
12321232
self.assert_deprecated(lambda: getattr(finfo, "machar"))
1233+
1234+
1235+
class TestQuantileInterpolationDeprecation(_DeprecationTestCase):
1236+
# Deprecated 2021-11-08, NumPy 1.22
1237+
@pytest.mark.parametrize("func",
1238+
[np.percentile, np.quantile, np.nanpercentile, np.nanquantile])
1239+
def test_deprecated(self, func):
1240+
self.assert_deprecated(
1241+
lambda: func([0., 1.], 0., interpolation="linear"))
1242+
self.assert_deprecated(
1243+
lambda: func([0., 1.], 0., interpolation="nearest"))
1244+
1245+
@pytest.mark.parametrize("func",
1246+
[np.percentile, np.quantile, np.nanpercentile, np.nanquantile])
1247+
def test_both_passed(self, func):
1248+
with warnings.catch_warnings():
1249+
# catch the DeprecationWarning so that it does not raise:
1250+
warnings.simplefilter("always", DeprecationWarning)
1251+
with pytest.raises(TypeError):
1252+
func([0., 1.], 0., interpolation="nearest", method="nearest")

numpy/core/tests/test_umath.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def get_glibc_version():
2828

2929

3030
glibcver = get_glibc_version()
31-
glibc_newerthan_2_17 = pytest.mark.xfail(
32-
glibcver != '0.0' and glibcver < '2.17',
33-
reason="Older glibc versions may not raise appropriate FP exceptions")
31+
glibc_older_than = lambda x: (glibcver != '0.0' and glibcver < x)
3432

3533
def on_powerpc():
3634
""" True if we are running on a Power PC platform."""
@@ -50,14 +48,6 @@ def bad_arcsinh():
5048
# The eps for float128 is 1-e33, so this is way bigger
5149
return abs((v1 / v2) - 1.0) > 1e-23
5250

53-
if platform.machine() == 'aarch64' and bad_arcsinh():
54-
skip_longcomplex_msg = ('Trig functions of np.longcomplex values known to be '
55-
'inaccurate on aarch64 for some compilation '
56-
'configurations, should be fixed by building on a '
57-
'platform using glibc>2.17')
58-
else:
59-
skip_longcomplex_msg = ''
60-
6151

6252
class _FilterInvalids:
6353
def setup(self):
@@ -1022,9 +1012,11 @@ def test_exp_values(self):
10221012
yf = np.array(y, dtype=dt)
10231013
assert_equal(np.exp(yf), xf)
10241014

1025-
# Older version of glibc may not raise the correct FP exceptions
10261015
# See: https://github.com/numpy/numpy/issues/19192
1027-
@glibc_newerthan_2_17
1016+
@pytest.mark.xfail(
1017+
glibc_older_than("2.17"),
1018+
reason="Older glibc versions may not raise appropriate FP exceptions"
1019+
)
10281020
def test_exp_exceptions(self):
10291021
with np.errstate(over='raise'):
10301022
assert_raises(FloatingPointError, np.exp, np.float32(100.))
@@ -1405,8 +1397,10 @@ def test_sincos_float32(self):
14051397
M = np.int_(N/20)
14061398
index = np.random.randint(low=0, high=N, size=M)
14071399
x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=N))
1408-
# test coverage for elements > 117435.992f for which glibc is used
1409-
x_f32[index] = np.float32(10E+10*np.random.rand(M))
1400+
if not glibc_older_than("2.17"):
1401+
# test coverage for elements > 117435.992f for which glibc is used
1402+
# this is known to be problematic on old glibc, so skip it there
1403+
x_f32[index] = np.float32(10E+10*np.random.rand(M))
14101404
x_f64 = np.float64(x_f32)
14111405
assert_array_max_ulp(np.sin(x_f32), np.float32(np.sin(x_f64)), maxulp=2)
14121406
assert_array_max_ulp(np.cos(x_f32), np.float32(np.cos(x_f64)), maxulp=2)
@@ -3439,13 +3433,14 @@ def check(x, rtol):
34393433
x_series = np.logspace(-20, -3.001, 200)
34403434
x_basic = np.logspace(-2.999, 0, 10, endpoint=False)
34413435

3442-
if dtype is np.longcomplex:
3436+
if glibc_older_than("2.19") and dtype is np.longcomplex:
3437+
if (platform.machine() == 'aarch64' and bad_arcsinh()):
3438+
pytest.skip("Trig functions of np.longcomplex values known "
3439+
"to be inaccurate on aarch64 for some compilation "
3440+
"configurations.")
34433441
# It's not guaranteed that the system-provided arc functions
34443442
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
34453443
# So, give more leeway for long complex tests here:
3446-
# Can use 2.1 for > Ubuntu LTS Trusty (2014), glibc = 2.19.
3447-
if skip_longcomplex_msg:
3448-
pytest.skip(skip_longcomplex_msg)
34493444
check(x_series, 50.0*eps)
34503445
else:
34513446
check(x_series, 2.1*eps)

numpy/f2py/capi_maps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def getpydocsign(a, var):
442442
sigout = sig
443443
else:
444444
errmess(
445-
'getpydocsign: Could not resolve docsignature for "%s".\\n' % a)
445+
'getpydocsign: Could not resolve docsignature for "%s".\n' % a)
446446
return sig, sigout
447447

448448

numpy/f2py/crackfortran.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,10 +1170,10 @@ def analyzeline(m, case, line):
11701170
groupcache[groupcounter]['args'].append(k)
11711171
else:
11721172
errmess(
1173-
'analyzeline: intent(callback) %s is ignored' % (k))
1173+
'analyzeline: intent(callback) %s is ignored\n' % (k))
11741174
else:
11751175
errmess('analyzeline: intent(callback) %s is already'
1176-
' in argument list' % (k))
1176+
' in argument list\n' % (k))
11771177
if case in ['optional', 'required', 'public', 'external', 'private', 'intrinsic']:
11781178
ap = case
11791179
if 'attrspec' in edecl[k]:
@@ -1868,11 +1868,11 @@ def get_useparameters(block, param_map=None):
18681868
continue
18691869
# XXX: apply mapping
18701870
if mapping:
1871-
errmess('get_useparameters: mapping for %s not impl.' % (mapping))
1871+
errmess('get_useparameters: mapping for %s not impl.\n' % (mapping))
18721872
for k, v in list(params.items()):
18731873
if k in param_map:
18741874
outmess('get_useparameters: overriding parameter %s with'
1875-
' value from module %s' % (repr(k), repr(usename)))
1875+
' value from module %s\n' % (repr(k), repr(usename)))
18761876
param_map[k] = v
18771877

18781878
return param_map
@@ -2385,7 +2385,7 @@ def get_parameters(vars, global_params={}):
23852385

23862386
elif iscomplex(vars[n]):
23872387
outmess(f'get_parameters[TODO]: '
2388-
f'implement evaluation of complex expression {v}')
2388+
f'implement evaluation of complex expression {v}\n')
23892389

23902390
try:
23912391
params[n] = eval(v, g_params, params)
@@ -2633,7 +2633,7 @@ def analyzevars(block):
26332633
vars[n]['intent'].append('c')
26342634
else:
26352635
errmess(
2636-
"analyzevars: charselector=%r unhandled." % (d))
2636+
"analyzevars: charselector=%r unhandled.\n" % (d))
26372637

26382638
if 'check' not in vars[n] and 'args' in block and n in block['args']:
26392639
# n is an argument that has no checks defined. Here we

numpy/f2py/f2py2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def scaninputline(inputline):
286286
sys.exit()
287287
if not os.path.isdir(buildpath):
288288
if not verbose:
289-
outmess('Creating build directory %s' % (buildpath))
289+
outmess('Creating build directory %s\n' % (buildpath))
290290
os.mkdir(buildpath)
291291
if signsfile:
292292
signsfile = os.path.join(buildpath, signsfile)

0 commit comments

Comments
 (0)
0