8000 BLD: default to using meson-python as build backend · numpy/numpy@d9160f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9160f2

Browse files
committed
BLD: default to using meson-python as build backend
1 parent fa284a5 commit d9160f2

File tree

3 files changed

+61
-76
lines changed

3 files changed

+61
-76
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(
44
# Note that the git commit hash cannot be added dynamically here
55
# It is dynamically added upon import by versioneer
66
# See `numpy/__init__.py`
7-
version: '1.24.0.dev0',
7+
version: '2.0.0.dev0',
88
license: 'BSD-3',
99
meson_version: '>= 1.1.0',
1010
default_options: [

numpy/tests/test_public_api.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,6 @@ def check_importable(module_name):
470470
"{}".format(module_names))
471471

472472

473-
@pytest.mark.xfail(
474-
hasattr(np.__config__, "_built_with_meson"),
475-
reason = "Meson does not yet support entry points via pyproject.toml",
476-
)
477473
@pytest.mark.xfail(
478474
sysconfig.get_config_var("Py_DEBUG") is not None,
479475
reason=(

pyproject.toml

Lines changed: 60 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,68 @@
11
[build-system]
2-
# Uncomment this line, the `meson-python` requires line, and the [project] and
3-
# [project.urls] tables below in order to build with Meson by default
4-
#build-backend = "mesonpy"
2+
build-backend = "mesonpy"
53
requires = [
6-
# setuptools, wheel and Cython are needed for the setup.py based build
7-
"setuptools==59.2.0",
8-
# `wheel` is needed for non-isolated builds, given that `meson-python`
9-
# doesn't list it as a runtime requirement (at least in 0.11.0) - it's
10-
# likely to be removed as a dependency in meson-python 0.12.0.
11-
"wheel==0.38.1",
124
"Cython>=0.29.34,<3.0",
13-
# "meson-python>=0.10.0",
5+
"meson-python>=0.10.0",
146
]
157

16-
#[project]
17-
#name = "numpy"
18-
#
19-
## Using https://peps.python.org/pep-0639/
20-
## which is still in draft
21-
#license = {text = "BSD-3-Clause"}
22-
## Note: needed for Meson, but setuptools errors on it. Uncomment once Meson is default.
23-
##license-files.paths = [
24-
## "LICENSE.txt",
25-
## "LICENSES_bundles.txt"
26-
##]
27-
#
28-
#description = "Fundamental package for array computing in Python"
29-
#authors = [{name = "Travis E. Oliphant et al."}]
30-
#maintainers = [
31-
# {name = "NumPy Developers", email="numpy-discussion@python.org"},
32-
#]
33-
#requires-python = ">=3.9"
34-
#readme = "README.md"
35-
#classifiers = [
36-
# 'Development Status :: 5 - Production/Stable',
37-
# 'Intended Audience :: Science/Research',
38-
# 'Intended Audience :: Developers',
39-
# 'License :: OSI Approved :: BSD License',
40-
# 'Programming Language :: C',
41-
# 'Programming Language :: Python',
42-
# 'Programming Language :: Python :: 3',
43-
# 'Programming Language :: Python :: 3.9',
44-
# 'Programming Language :: Python :: 3.10',
45-
# 'Programming Language :: Python :: 3.11',
46-
# 'Programming Language :: Python :: 3 :: Only',
47-
# 'Programming Language :: Python :: Implementation :: CPython',
48-
# 'Topic :: Software Development',
49-
# 'Topic :: Scientific/Engineering',
50-
# 'Typing :: Typed',
51-
# 'Operating System :: Microsoft :: Windows',
52-
# 'Operating System :: POSIX',
53-
# 'Operating System :: Unix',
54-
# 'Operating System :: MacOS',
55-
#]
56-
#dynamic = ["version", "scripts"]
57-
#
58-
#[project.scripts]
59-
## Note: this is currently dynamic, see setup.py. Can we get rid of that?
60-
## see commit f22a33b71 for rationale for dynamic behavior
61-
#'f2py = numpy.f2py.f2py2e:main'
62-
#'f2py3 = numpy.f2py.f2py2e:main'
63-
#'f2py3.MINOR_VERSION = numpy.f2py.f2py2e:main'
64-
#
65-
# When enabling this stanza, make sure to remove the meson-specific xfail from
66-
# numpy/tests/test_public_api.py
67-
#[project.entry-points]
68-
#'array_api': 'numpy = numpy.array_api'
69-
#'pyinstaller40': 'hook-dirs = numpy:_pyinstaller_hooks_dir'
70-
#
71-
#[project.urls]
72-
#homepage = "https://numpy.org"
73-
#documentation = "https://numpy.org/doc/"
74-
#source = "https://github.com/numpy/numpy"
75-
#download = "https://pypi.org/project/numpy/#files"
76-
#tracker = "https://github.com/numpy/numpy/issues"
8+
[project]
9+
name = "numpy"
10+
version = "2.0.0.dev0"
11+
12+
# Using https://peps.python.org/pep-0639/ which is still in draft
13+
license = {text = "BSD-3-Clause"}
14+
license-files.paths = [
15+
"LICENSE.txt",
16+
"LICENSES_bundles.txt"
17+
]
18+
19+
description = "Fundamental package for array computing in Python"
20+
authors = [{name = "Travis E. Oliphant et al."}]
21+
maintainers = [
22+
{name = "NumPy Developers", email="numpy-discussion@python.org"},
23+
]
24+
requires-python = ">=3.9"
25+
readme = "README.md"
26+
classifiers = [
27+
'Development Status :: 5 - Production/Stable',
28+
'Intended Audience :: Science/Research',
29+
'Intended Audience :: Developers',
30+
'License :: OSI Approved :: BSD License',
31+
'Programming Language :: C',
32+
'Programming Language :: Python',
33+
'Programming Language :: Python :: 3',
34+
'Programming Language :: Python :: 3.9',
35+
'Programming Language :: Python :: 3.10',
36+
'Programming Language :: Python :: 3.11',
37+
'Programming Language :: Python :: 3 :: Only',
38+
'Programming Language :: Python :: Implementation :: CPython',
39+
'Topic :: Software Development',
40+
'Topic :: Scientific/Engineering',
41+
'Typing :: Typed',
42+
'Operating System :: Microsoft :: Windows',
43+
'Operating System :: POSIX',
44+
'Operating System :: Unix',
45+
'Operating System :: MacOS',
46+
]
47+
dynamic = ["scripts"]
48+
49+
[project.scripts]
50+
# Note: this is currently dynamic, see setup.py. Can we get rid of that?
51+
# see commit f22a33b71 for rationale for dynamic behavior
52+
'f2py = numpy.f2py.f2py2e:main'
53+
'f2py3 = numpy.f2py.f2py2e:main'
54+
'f2py3.MINOR_VERSION = numpy.f2py.f2py2e:main'
55+
56+
[project.entry-points]
57+
'array_api': 'numpy = numpy.array_api'
58+
'pyinstaller40': 'hook-dirs = numpy:_pyinstaller_hooks_dir'
59+
60+
[project.urls]
61+
homepage = "https://numpy.org"
62+
documentation = "https://numpy.org/doc/"
63+
source = "https://github.com/numpy/numpy"
64+
download = "https://pypi.org/project/numpy/#files"
65+
tracker = "https://github.com/numpy/numpy/issues"
7766

7867
[tool.towncrier]
7968
# Do no set this since it is hard to import numpy inside the source directory

0 commit comments

Comments
 (0)
0