forked from pyFFTW/pyFFTW
-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
212 lines (170 loc) · 7.95 KB
/
pyproject.toml
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
200
201
202
203
204
205
206
207
208
209
210
211
212
[tool.cibuildwheel]
build-verbosity = 2
# Note: Tests are run within a docker container on Linux builds
# This will have a different
test-requires = "pytest scipy dask"
# Import-mode=append to use installed (wheel) version of pyfftw
# rather than the local module
test-command = "pytest --import-mode=append {project}"
[tool.cibuildwheel.environment]
PIP_PREFER_BINARY = true
[tool.cibuildwheel.windows]
archs = [
"AMD64",
"x86",
"ARM64",
]
test-skip = [
# Until SciPy does not support win32
"*win32",
# We can't run tests when cross-compiling for ARM64 on AMD64
"*win_arm64",
# Until SciPy gives us PyPy wheels
"pp*",
]
[tool.cibuildwheel.macos]
archs = [
"x86_64",
# See issue [#352](https://github.com/pyFFTW/pyFFTW/issues/352)
# TODO: Add arm64 when we support it
# Current problem seems to be that installed libfftw3 does not provide arm64
# symbols
# "universal2",
# "arm64",
]
test-skip = [
# Until SciPy gives us PyPy wheels
"pp*",
]
[tool.cibuildwheel.macos.environment]
CC = "/usr/bin/clang"
CXX = "/usr/bin/clang++"
CFLAGS = "-Wno-implicit-function-declaration -I/usr/local/opt/fftw/include"
LDFLAGS = "-Wl,-S,-rpath,/usr/local/opt/fftw/lib -L/usr/local/opt/fftw/lib"
# On Linux we need to use different package managers depending on image used
[tool.cibuildwheel.linux]
test-skip = [
# See: https://github.com/pyFFTW/pyFFTW/issues/325
"*i686",
# See: https://github.com/pyFFTW/pyFFTW/issues/326
"*aarch64",
# Until SciPy gives us PyPy wheels
"pp*",
]
# Fallback, but we specify versions more explicitly below to achieve maximal
# compatibility
before-all = "apt update; apt install libfftw3-dev"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-ppc64le-image = "manylinux_2_28"
manylinux-s390x-image = "manylinux_2_28"
manylinux-pypy_x86_64-image = "manylinux_2_28"
manylinux-pypy_i686-image = "manylinux_2_28"
manylinux-pypy_aarch64-image = "manylinux_2_28"
archs = [
"x86_64",
"i686",
"aarch64",
]
# Select based on manylinux availability
# See: https://github.com/pypa/manylinux
# See: https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
# See: https://github.com/pypa/manylinux/issues/994#issuecomment-987835591
# From 3.10+ we can stop doing the madness below and just PEP 600 manylinux_x_y images
# Currently the selection of images is conservative and aims for maximal compatibility
# The best choice of manylinux is determined by the following:
# manylinux version for numpy version for given python version
# Use manylinux2010 for Python3.8, as <3.8.4 does not initially work with manylinux2014
[[tool.cibuildwheel.overrides]]
select = "{c,p}p38-manylinux*"
manylinux-x86_64-image = "manylinux2010"
manylinux-i686-image = "manylinux2010"
manylinux-aarch64-image = "manylinux2014"
manylinux-ppc64le-image = "manylinux2014"
manylinux-s390x-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2010"
manylinux-pypy_i686-image = "manylinux2010"
manylinux-pypy_aarch64-image = "manylinux2014"
before-all = "yum install -y fftw-devel"
# Use manylinux2014 for Python3.9, as <3.9.5 does not initially work with manylinux_x_y
[[tool.cibuildwheel.overrides]]
select = "{c,p}p39-manylinux*"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
manylinux-ppc64le-image = "manylinux2014"
manylinux-s390x-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_i686-image = "manylinux2014"
manylinux-pypy_aarch64-image = "manylinux2014"
before-all = "yum install -y fftw-devel"
[[tool.cibuildwheel.overrides]]
select = "{c,p}p310-manylinux*"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
manylinux-ppc64le-image = "manylinux2014"
manylinux-s390x-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_i686-image = "manylinux2014"
manylinux-pypy_aarch64-image = "manylinux2014"
before-all = "yum install -y fftw-devel"
[[tool.cibuildwheel.overrides]]
select = "{c,p}p311-manylinux*"
# Based on https://pypi.org/project/numpy/1.24.0/#files
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
manylinux-ppc64le-image = "manylinux2014"
manylinux-s390x-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_i686-image = "manylinux2014"
manylinux-pypy_aarch64-image = "manylinux2014"
before-all = "yum install -y fftw-devel"
# Currently not supported
# Even numpy does not support this
# This is ignored in the wheel_tests_and_release.yml file
# [[tool.cibuildwheel.overrides]]
# select = "*-musllinux*"
# before-all = "apk add fftw-dev"
[build-system]
requires = [
"wheel",
"setuptools<=59.4.0",
"Cython>=0.29.18",
# NumPy dependencies - to update these, sync from
# https://github.com/scipy/oldest-supported-numpy/
# https://github.com/scipy/scipy/blob/master/pyproject.toml
# and then
# update minimum version to match our install_requires min version
# ----------------------------------------------------------------
# now matches minimum supported version, keep here as separate requirement
# to be able to sync more easily with oldest-supported-numpy
"numpy==1.19.5; python_version=='3.8' and platform_machine=='aarch64' and platform_python_implementation != 'PyPy'",
# arm64 on Darwin supports Python 3.8 and above requires numpy>=1.21.0
# (first version with arm64 wheels available)
"numpy==1.21.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'",
"numpy==1.21.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'",
# loongarch64 requires numpy>=1.22.0
"numpy==1.22.0; platform_machine=='loongarch64'",
# On Windows we need to avoid 1.21.6, 1.22.0 and 1.22.1 because they were
# built with vc142. 1.22.3 is the first version that has 32-bit Windows
# wheels *and* was built with vc141. So use that:
"numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'",
# default numpy requirements
"numpy==1.19.5; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_machine!='loongarch64' and platform_python_implementation != 'PyPy'",
"numpy==1.19.5; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='loongarch64' and platform_python_implementation != 'PyPy'",
# Note that 1.21.3 was the first version with a complete set of 3.10 wheels,
# however macOS was broken and it's safe C API/ABI-wise to build against 1.21.6
# (see oldest-supported-numpy issues gh-28 and gh-45)
"numpy==1.21.6; python_version=='3.10' and (platform_system!='Windows' and platform_machine!='loongarch64') and platform_python_implementation != 'PyPy'",
"numpy==1.23.2; python_version=='3.11' and platform_python_implementation != 'PyPy'",
# For Python versions which aren't yet officially supported,
# we specify an unpinned NumPy which allows source distributions
# to be used and allows wheels to be used as soon as they
# become available.
"numpy; python_version>='3.12'",
"numpy; python_version>='3.9' and platform_python_implementation=='PyPy'",
]
build-backend = "setuptools.build_meta"