Skip to content

Commit 85ae3f8

Browse files
authored
Move to pyproject.toml based install (#401)
1 parent 81dc8b5 commit 85ae3f8

File tree

2 files changed

+72
-77
lines changed

2 files changed

+72
-77
lines changed

pyproject.toml

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,83 @@
11
[build-system]
2-
requires = [
3-
"setuptools >= 35.0.2",
4-
"setuptools_scm >= 2.0.0, <3"
5-
]
62
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools ~= 65.0.0", "versioningit ~= 2.0.1", "wheel"]
4+
5+
[project]
6+
name = "adaptive"
7+
dynamic = ["version"]
8+
description = "Parallel active learning of mathematical functions"
9+
maintainers = [{ name = "Adaptive authors" }]
10+
license = { text = "BSD" }
11+
requires-python = ">=3.7"
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"License :: OSI Approved :: BSD License",
15+
"Intended Audience :: Science/Research",
16+
"Programming Language :: Python :: 3.7",
17+
"Programming Language :: Python :: 3.8",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
]
22+
dependencies = [
23+
"scipy",
24+
"sortedcollections >= 1.1",
25+
"sortedcontainers >= 2.0",
26+
"cloudpickle",
27+
"loky >= 2.9",
28+
"typing_extensions; python_version < '3.10'",
29+
]
30+
31+
[project.optional-dependencies]
32+
other =[
33+
"dill",
34+
"distributed",
35+
"ipyparallel>=6.2.5", # because of https://github.com/ipython/ipyparallel/issues/404
36+
"scikit-optimize>=0.8.1", # because of https://github.com/scikit-optimize/scikit-optimize/issues/931
37+
"scikit-learn",
38+
"wexpect; os_name == 'nt'",
39+
"pexpect; os_name != 'nt'",
40+
]
41+
notebook = [
42+
"ipython",
43+
"ipykernel>=4.8.0", # because https://github.com/ipython/ipykernel/issues/274 and https://github.com/ipython/ipykernel/issues/263
44+
"jupyter_client>=5.2.2", # because https://github.com/jupyter/jupyter_client/pull/314
45+
"holoviews>=1.9.1",
46+
"ipywidgets",
47+
"bokeh",
48+
"pandas",
49+
"matplotlib",
50+
"plotly",
51+
]
52+
testing = [
53+
"flaky",
54+
"pytest",
55+
"pytest-cov",
56+
"pytest-randomly",
57+
"pytest-timeout",
58+
"pre_commit",
59+
"typeguard",
60+
]
61+
62+
[project.urls]
63+
homepage = "https://adaptive.readthedocs.io/"
64+
documentation = "https://adaptive.readthedocs.io/"
65+
repository = "https://github.com/python-adaptive/adaptive"
66+
67+
[project.readme]
68+
content-type = "text/markdown"
69+
file = "README.md"
70+
71+
[tool.setuptools.packages.find]
72+
include = ["adaptive.*", "adaptive"]
773

874
[tool.pytest.ini_options]
975
testpaths = ["adaptive"]
1076
addopts = "--durations=5 --cov --cov-append --cov-fail-under=70 -vvv --cov-report="
1177
norecursedirs = ["docs"]
1278

1379
[tool.coverage.paths]
14-
source = [
15-
"adaptive",
16-
".nox/py*/lib/python*/site-packages",
17-
]
80+
source = ["adaptive", ".nox/py*/lib/python*/site-packages"]
1881

1982
[tool.coverage.run]
2083
branch = true

setup.py

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import os
4-
import sys
5-
6-
from setuptools import find_packages, setup
7-
8-
if sys.version_info < (3, 7):
9-
print("adaptive requires Python 3.7 or above.")
10-
sys.exit(1)
3+
from setuptools import setup
114

125

136
# Loads _version.py module without importing the whole package.
@@ -24,67 +17,6 @@ def get_version_and_cmdclass(package_name):
2417
version, cmdclass = get_version_and_cmdclass("adaptive")
2518

2619

27-
install_requires = [
28-
"scipy",
29-
"sortedcollections >= 1.1",
30-
"sortedcontainers >= 2.0",
31-
"cloudpickle",
32-
"loky >= 2.9",
33-
]
34-
if sys.version_info < (3, 10):
35-
install_requires.append("typing_extensions")
36-
37-
extras_require = {
38-
"notebook": [
39-
"ipython",
40-
"ipykernel>=4.8.0", # because https://github.com/ipython/ipykernel/issues/274 and https://github.com/ipython/ipykernel/issues/263
41-
"jupyter_client>=5.2.2", # because https://github.com/jupyter/jupyter_client/pull/314
42-
"holoviews>=1.9.1",
43-
"ipywidgets",
44-
"bokeh",
45-
"pandas",
46-
"matplotlib",
47-
"plotly",
48-
],
49-
"testing": [
50-
"flaky",
51-
"pytest",
52-
"pytest-cov",
53-
"pytest-randomly",
54-
"pytest-timeout",
55-
"pre_commit",
56-
"typeguard",
57-
],
58-
"other": [
59-
"dill",
60-
"distributed",
61-
"ipyparallel>=6.2.5", # because of https://github.com/ipython/ipyparallel/issues/404
62-
"scikit-optimize>=0.8.1", # because of https://github.com/scikit-optimize/scikit-optimize/issues/931
63-
"scikit-learn",
64-
"wexpect" if os.name == "nt" else "pexpect",
65-
],
66-
}
67-
6820
setup(
69-
name="adaptive",
70-
description="Parallel active learning of mathematical functions",
71-
version=version,
72-
python_requires=">=3.7",
73-
url="https://adaptive.readthedocs.io/",
74-
author="Adaptive authors",
75-
license="BSD",
76-
classifiers=[
77-
"Development Status :: 4 - Beta",
78-
"License :: OSI Approved :: BSD License",
79-
"Intended Audience :: Science/Research",
80-
"Programming Language :: Python :: 3.7",
81-
"Programming Language :: Python :: 3.8",
82-
"Programming Language :: Python :: 3.9",
83-
"Programming Language :: Python :: 3.10",
84-
"Programming Language :: Python :: 3.11",
85-
],
86-
packages=find_packages("."),
87-
install_requires=install_requires,
88-
extras_require=extras_require,
8921
cmdclass=cmdclass,
9022
)

0 commit comments

Comments
 (0)