Skip to content

Commit 24fd987

Browse files
committed
Add pyproject.toml
1 parent 19f5209 commit 24fd987

File tree

5 files changed

+54
-51
lines changed

5 files changed

+54
-51
lines changed

.github/workflows/tests.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ jobs:
2929
PIP_EXTRA='numpy==1.26.*'
3030
fi
3131
32-
if [ "${{ matrix.python-version }}" == "3.9" ]; then
33-
sed -i '/^ndonnx/d' requirements-dev.txt
34-
fi
35-
36-
python -m pip install -r requirements-dev.txt $PIP_EXTRA
32+
python -m pip install .[dev] $PIP_EXTRA
3733
3834
- name: Run Tests
3935
run: |

docs/dev/tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ the array API standard. There are also array-api-compat specific tests in
77
These tests should be limited to things that are not tested by the test suite,
88
e.g., tests for [helper functions](../helper-functions.rst) or for behavior
99
that is not strictly required by the standard. To run these tests, install the
10-
dependencies from `requirements-dev.txt` (array-api-compat has [no hard
10+
dependencies from the `dev` optional group (array-api-compat has [no hard
1111
runtime dependencies](no-dependencies)).
1212

1313
array-api-tests is run against all supported libraries are tested on CI

pyproject.toml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "array-api-compat"
7+
dynamic = ["version"]
8+
description = "A wrapper around NumPy and other array libraries to make them compatible with the Array API standard"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
license = {file = "LICENSE"}
12+
authors = [{name = "Consortium for Python Data API Standards"}]
13+
classifiers = [
14+
"License :: OSI Approved :: MIT License",
15+
"Operating System :: OS Independent",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
"Typing :: Typed",
24+
]
25+
26+
[project.optional-dependencies]
27+
cupy = ["cupy"]
28+
dask = ["dask"]
29+
jax = ["jax"]
30+
numpy = ["numpy"]
31+
pytorch = ["torch"]
32+
sparse = ["sparse>=0.15.1"]
33+
dev = [
34+
"array-api-strict",
35+
"dask[array]",
36+
"jax[cpu]",
37+
"numpy",
38+
"pytest",
39+
"torch",
40+
"sparse>=0.15.1",
41+
"ndonnx; python_version>=3.10"
42+
]
43+
44+
[project.urls]
45+
homepage = "https://data-apis.org/array-api-compat/"
46+
repository = "https://github.com/data-apis/array-api-compat/"
47+
48+
[tool.setuptools.dynamic]
49+
version = {attr = "array_api_compat.__version__"}
50+
51+
[tool.setuptools.packages.find]
52+
include = ["array_api_compat.*"]

requirements-dev.txt

-8
This file was deleted.

setup.py

-37
This file was deleted.

0 commit comments

Comments
 (0)