forked from conda-forge/numpy-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 4
/
meta.yaml
199 lines (187 loc) · 6.91 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{% set version = "2.1.3" %}
# numpy will by default use the ABI feature level for the first numpy version
# that added support for the oldest currently-supported CPython version; see
# https://github.com/numpy/numpy/blob/v2.1.1/numpy/_core/include/numpy/numpyconfig.h#L125
{% set default_abi_level = "1.21" %}
package:
name: numpy_and_numpy_base
version: {{ version }}
source:
- url: https://github.com/numpy/numpy/releases/download/v{{ version }}/numpy-{{ version }}.tar.gz
sha256: aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761
patches: # [blas_impl == "mkl" or s390x]
- patches/0003-intel_init_mkl.patch # [blas_impl == "mkl"]
- patches/0004-Partially-revert-function-blocklisting-for-glibc-lt-2.18.patch # [s390x]
build:
number: 0
# numpy 2.1.3 no longer supports Python 3.9: https://numpy.org/devdocs/release/2.1.3-notes.html
skip: True # [(blas_impl == 'openblas' and win)]
skip: True # [py<310 or py>=314]
force_use_keys:
- python
requirements:
build:
- patch # [(blas_impl == "mkl" or s390x) and not win]
- m2-patch # [(blas_impl == "mkl") and win]
outputs:
# this one has all the actual contents
- name: numpy-base
script: install_base.sh # [unix]
script: install_base.bat # [win]
build:
entry_points:
- f2py = numpy.f2py.f2py2e:main
- numpy-config = numpy._configtool:main
missing_dso_whitelist: # [s390x]
- $RPATH/ld64.so.1 # [s390x]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- armpl # [aarch64]
- ninja-base
- pkg-config
host:
- python
- pip
- cython >=3.0.6
- meson-python >=0.15.0
- python-build
# blas
- mkl-devel {{ mkl }} # [blas_impl == "mkl"]
- openblas-devel {{ openblas }} # [blas_impl == "openblas"]
run:
- python
run_constrained:
# restrict setuptools: see https://github.com/numpy/numpy/issues/27405
# TODO remove when numpy stop using distutils.msvccompiler from setuptools.
- setuptools <74
# When building out the initial package set for a new Python version / MKL version the
# recommendation is to build numpy-base but not numpy, then build
# mkl_fft and mkl_random, and then numpy.
# If only_build_numpy_base: "yes build numpy-base only; otherwise build all the outputs.
{% if only_build_numpy_base != 'yes' %}
# numpy is a metapackage that may include mkl_fft and mkl_random both of
# which require numpy-base to build
- name: numpy
build:
missing_dso_whitelist: # [s390x]
- $RPATH/ld64.so.1 # [s390x]
run_exports:
- numpy >={{ default_abi_level }},<3
requirements:
build:
# for runtime alignment
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- armpl # [aarch64]
host:
- python
# these import blas metapackages to ensure consistency with downstream libs that also use blas
- mkl-devel {{ mkl }} # [blas_impl == 'mkl']
- openblas-devel {{ openblas }} # [blas_impl == 'openblas']
run:
- python
- {{ pin_subpackage('numpy-base', exact=True) }}
# openblas or mkl runtime included with run_exports
- mkl_fft # [blas_impl == 'mkl']
- mkl_random # [blas_impl == 'mkl' and (not win or vc>=14)]
run_constrained:
# restrict setuptools: see https://github.com/numpy/numpy/issues/27405
# TODO remove when numpy stop using distutils.msvccompiler from setuptools.
- setuptools <74
{% endif %}
{% set tests_to_skip = "_not_a_real_test" %}
# https://github.com/numpy/numpy/issues/3858 - could be related
{% set tests_to_skip = tests_to_skip + " or test_big_arrays" %} # [s390x]
# https://github.com/numpy/numpy/issues/16046
{% set tests_to_skip = tests_to_skip + " or test_gcd_overflow" %} # [s390x]
# skip simd tests because vxe2 feature is not detected when running from prefect
{% set tests_to_skip = tests_to_skip + " or test_features" %} # [s390x]
# https://github.com/numpy/numpy/issues/27313 - can be removed with clang >=16 update
{% set tests_to_skip = tests_to_skip + " or (test_unary_spurious_fpexception and (f-cos or f-sin))" %} # [osx and arm64]
test:
requires:
- pip
- pytest >=7.4.0
- pytest-cov >=4.1.0
- pytest-xdist
# due to hotfix this is the only hypothesis version that works with numpy 2.0.0 and above
- hypothesis >=6.111.0
- pytz >=2023.3.post1
- {{ compiler('c') }} # [not osx]
- {{ compiler('cxx') }} # [not osx]
- {{ compiler('fortran') }} # [not osx]
- nomkl # [x86 and blas_impl != 'mkl']
- typing-extensions >=4.2.0
- mypy >=1.7.1
- cffi # [py<310]
- charset-normalizer
- meson
commands:
- f2py -h
- python -c "import numpy; numpy.show_config()"
- export OPENBLAS_NUM_THREADS=1 # [unix]
- set OPENBLAS_NUM_THREADS=1 # [win]
- export CPU_COUNT=4 # [linux and ppc64le]
- pytest -vv --pyargs numpy -k "not ({{ tests_to_skip }})" --durations=50 --durations-min=1.0
imports:
- numpy
- numpy.core.multiarray
- numpy.core.numeric
- numpy.core.umath
- numpy.linalg.lapack_lite
- numpy.random.mtrand
# from numpy/tests/test_public_api.py
- numpy.ctypeslib
- numpy.dtypes
- numpy.exceptions
- numpy.f2py
- numpy.fft
- numpy.lib
- numpy.lib.array_utils
- numpy.lib.format
- numpy.lib.introspect
- numpy.lib.mixins
- numpy.lib.npyio
- numpy.lib.recfunctions # note: still needs cleaning, was forgotten for 2.0
- numpy.lib.scimath
- numpy.lib.stride_tricks
- numpy.linalg
- numpy.ma
- numpy.ma.extras
- numpy.ma.mrecords
- numpy.polynomial
- numpy.polynomial.chebyshev
- numpy.polynomial.hermite
- numpy.polynomial.hermite_e
- numpy.polynomial.laguerre
- numpy.polynomial.legendre
- numpy.polynomial.polynomial
- numpy.random
- numpy.strings
- numpy.testing
- numpy.testing.overrides
- numpy.typing
- numpy.typing.mypy_plugin
- numpy.version
about:
home: https://numpy.org/
license: BSD-3-Clause
license_family: BSD
license_file:
- LICENSE.txt
- LICENSES_bundled.txt
summary: Array processing for numbers, strings, records, and objects.
description: |
NumPy is the fundamental package needed for scientific computing with Python.
doc_url: https://numpy.org/doc/stable/reference/
dev_url: https://github.com/numpy/numpy
extra:
recipe-maintainers:
- jakirkham
- msarahan
- pelson
- rgommers
- ocefpaf
- chenghlee