Skip to content

Commit 94f964c

Browse files
committed
MAINT: Update build system to be PEP518 fully compliant
1 parent 6bba1b2 commit 94f964c

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[build-system]
22
requires = [
3-
"setuptools >= 34.4",
3+
"setuptools >= 40.9",
44
"setuptools_scm[toml] >= 3.4",
55
"wheel"
66
]
7+
build-backend = "setuptools.build_meta"
78

89
[tool.setuptools_scm]
910
write_to = "templateflow/_version.py"

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ long_description = file:README.rst
1414
long_description_content_type = text/x-rst; charset=UTF-8
1515
maintainer = The NiPreps developers
1616
maintainer_email = [email protected]
17+
name = templateflow
1718
project_urls =
1819
Archive = https://github.com/templateflow/templateflow
1920
Bug Tracker = https://github.com/templateflow/python-client/issues
@@ -23,6 +24,10 @@ project_urls =
2324

2425
[options]
2526
python_requires = >= 3.6
27+
setup_requires =
28+
setuptools >= 40.9
29+
setuptools_scm[toml] >= 3.4
30+
wheel
2631
install_requires =
2732
pybids >= 0.12.1
2833
requests

setup.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
#!/usr/bin/env python
2-
"""Templateflow's setup script."""
3-
import sys
2+
"""Templateflow's PEP518 setup.py shim."""
43
from setuptools import setup
54

6-
7-
# Give setuptools a hint to complain if it's too old a version
8-
# 30.3.0 allows us to put most metadata in setup.cfg
9-
# Should match pyproject.toml
10-
# setuptools >= 34.4 required by setuptools_scm
11-
# 40.8.0 includes license_file, reducing MANIFEST.in requirements
12-
#
13-
# To install, 34.4.0 is enough, but if we're building an sdist, require 40.8.0
14-
# This imposes a stricter rule on the maintainer than the user
15-
# Keep the installation version synchronized with pyproject.toml
16-
SETUP_REQUIRES = ['setuptools >= %s' % ("40.8.0" if "sdist" in sys.argv else "34.4")]
17-
SETUP_REQUIRES += ["setuptools_scm >= 3.4", "toml"]
18-
# This enables setuptools to install wheel on-the-fly
19-
SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else []
20-
215
if __name__ == "__main__":
226
""" Install entry-point """
23-
setup(
24-
name="templateflow", setup_requires=SETUP_REQUIRES,
25-
)
7+
setup()

0 commit comments

Comments
 (0)