numpy
/
pyproject.toml
227 строк · 7.1 Кб
1[build-system]
2build-backend = "mesonpy"
3requires = [
4"meson-python>=0.15.0",
5"Cython>=3.0.6", # keep in sync with version check in meson.build
6]
7
8[project]
9name = "numpy"
10version = "2.2.0.dev0"
11# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88)
12license = {file = "LICENSE.txt"}
13
14description = "Fundamental package for array computing in Python"
15authors = [{name = "Travis E. Oliphant et al."}]
16maintainers = [
17{name = "NumPy Developers", email="numpy-discussion@python.org"},
18]
19requires-python = ">=3.10"
20readme = "README.md"
21classifiers = [
22'Development Status :: 5 - Production/Stable',
23'Intended Audience :: Science/Research',
24'Intended Audience :: Developers',
25'License :: OSI Approved :: BSD License',
26'Programming Language :: C',
27'Programming Language :: Python',
28'Programming Language :: Python :: 3',
29'Programming Language :: Python :: 3.10',
30'Programming Language :: Python :: 3.11',
31'Programming Language :: Python :: 3.12',
32'Programming Language :: Python :: 3 :: Only',
33'Programming Language :: Python :: Implementation :: CPython',
34'Topic :: Software Development',
35'Topic :: Scientific/Engineering',
36'Typing :: Typed',
37'Operating System :: Microsoft :: Windows',
38'Operating System :: POSIX',
39'Operating System :: Unix',
40'Operating System :: MacOS',
41]
42
43[project.scripts]
44f2py = 'numpy.f2py.f2py2e:main'
45numpy-config = 'numpy._configtool:main'
46
47[project.entry-points.array_api]
48numpy = 'numpy'
49
50[project.entry-points.pyinstaller40]
51hook-dirs = 'numpy:_pyinstaller_hooks_dir'
52
53[project.urls]
54homepage = "https://numpy.org"
55documentation = "https://numpy.org/doc/"
56source = "https://github.com/numpy/numpy"
57download = "https://pypi.org/project/numpy/#files"
58tracker = "https://github.com/numpy/numpy/issues"
59"release notes" = "https://numpy.org/doc/stable/release"
60
61[tool.towncrier]
62single_file = false
63filename = "doc/source/release/notes-towncrier.rst"
64directory = "doc/release/upcoming_changes/"
65issue_format = "`gh-{issue} <https://github.com/numpy/numpy/pull/{issue}>`__"
66template = "doc/release/upcoming_changes/template.rst"
67underlines = "~="
68all_bullets = false
69
70
71[[tool.towncrier.type]]
72directory = "highlight"
73name = "Highlights"
74showcontent = true
75
76[[tool.towncrier.type]]
77directory = "new_function"
78name = "New functions"
79showcontent = true
80
81[[tool.towncrier.type]]
82directory = "python_removal"
83name = "NumPy 2.0 Python API removals"
84showcontent = true
85
86[[tool.towncrier.type]]
87directory = "deprecation"
88name = "Deprecations"
89showcontent = true
90
91[[tool.towncrier.type]]
92directory = "future"
93name = "Future Changes"
94showcontent = true
95
96[[tool.towncrier.type]]
97directory = "expired"
98name = "Expired deprecations"
99showcontent = true
100
101[[tool.towncrier.type]]
102directory = "compatibility"
103name = "Compatibility notes"
104showcontent = true
105
106[[tool.towncrier.type]]
107directory = "c_api"
108name = "C API changes"
109showcontent = true
110
111[[tool.towncrier.type]]
112directory = "c_api_removal"
113name = "NumPy 2.0 C API removals"
114showcontent = true
115
116[[tool.towncrier.type]]
117directory = "new_feature"
118name = "New Features"
119showcontent = true
120
121[[tool.towncrier.type]]
122directory = "improvement"
123name = "Improvements"
124showcontent = true
125
126[[tool.towncrier.type]]
127directory = "performance"
128name = "Performance improvements and changes"
129showcontent = true
130
131[[tool.towncrier.type]]
132directory = "change"
133name = "Changes"
134showcontent = true
135
136
137[tool.cibuildwheel]
138# Note: the below skip command doesn't do much currently, the platforms to
139# build wheels for in CI are controlled in `.github/workflows/wheels.yml` and
140# `tools/ci/cirrus_wheels.yml`.
141build-frontend = "build"
142skip = "cp36-* cp37-* cp-38* pp37-* *-manylinux_i686 *_ppc64le *_s390x *_universal2"
143before-build = "bash {project}/tools/wheels/cibw_before_build.sh {project}"
144# The build will use openblas64 everywhere, except on arm64 macOS >=14.0 (uses Accelerate)
145config-settings = "setup-args=-Duse-ilp64=true setup-args=-Dallow-noblas=false build-dir=build"
146before-test = "pip install -r {project}/requirements/test_requirements.txt"
147test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}"
148
149[tool.cibuildwheel.linux]
150manylinux-x86_64-image = "manylinux2014"
151manylinux-aarch64-image = "manylinux2014"
152musllinux-x86_64-image = "musllinux_1_2"
153
154[tool.cibuildwheel.pyodide]
155config-settings = "build-dir=build setup-args=--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross setup-args=-Dblas=none setup-args=-Dlapack=none"
156
157[tool.cibuildwheel.linux.environment]
158# RUNNER_OS is a GitHub Actions specific env var; define it here so it works on Cirrus CI too
159RUNNER_OS="Linux"
160# /project will be the $PWD equivalent inside the docker used to build the wheel
161PKG_CONFIG_PATH="/project/.openblas"
162LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/project/.openblas/lib"
163
164[tool.cibuildwheel.macos]
165# universal2 wheels are not supported (see gh-21233), use `delocate-fuse` if you need them
166# note that universal2 wheels are not built, they're listed in the tool.cibuildwheel.skip
167# section
168# Not clear why the DYLD_LIBRARY_PATH is not passed through from the environment
169repair-wheel-command = [
170"export DYLD_LIBRARY_PATH=$PWD/.openblas/lib",
171"echo DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH",
172"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
173]
174
175[tool.cibuildwheel.windows]
176# This does not work, use CIBW_ENVIRONMENT_WINDOWS
177environment = {PKG_CONFIG_PATH="./.openblas"}
178config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=false build-dir=build"
179repair-wheel-command = "bash -el ./tools/wheels/repair_windows.sh {wheel} {dest_dir}"
180
181[[tool.cibuildwheel.overrides]]
182select = "*-win32"
183config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
184repair-wheel-command = ""
185
186[[tool.cibuildwheel.overrides]]
187select = "*pyodide*"
188before-test = "pip install -r {project}/requirements/emscripten_test_requirements.txt"
189# Pyodide ensures that the wheels are already repaired by auditwheel-emscripten
190repair-wheel-command = ""
191test-command = "python -m pytest --pyargs numpy -m 'not slow'"
192
193[tool.meson-python]
194meson = 'vendored-meson/meson/meson.py'
195
196[tool.meson-python.args]
197install = ['--tags=runtime,python-runtime,tests,devel']
198
199[tool.spin]
200package = 'numpy'
201
202[tool.spin.meson]
203cli = 'vendored-meson/meson/meson.py'
204
205[tool.spin.commands]
206"Build" = [
207".spin/cmds.py:build",
208".spin/cmds.py:test",
209".spin/cmds.py:mypy",
210".spin/cmds.py:config_openblas",
211".spin/cmds.py:lint",
212]
213"Environments" = [
214"spin.cmds.meson.run",
215".spin/cmds.py:ipython",
216".spin/cmds.py:python",
217"spin.cmds.meson.gdb",
218"spin.cmds.meson.lldb"
219]
220"Documentation" = [
221".spin/cmds.py:docs",
222".spin/cmds.py:changelog",
223".spin/cmds.py:notes",
224".spin/cmds.py:check_docs",
225".spin/cmds.py:check_tutorials",
226]
227"Metrics" = [".spin/cmds.py:bench"]
228