Skip to content

Commit

Permalink
Add build-system to pyproject.toml
Browse files Browse the repository at this point in the history
So doesn't use legacy stuff.

Fix #719.
  • Loading branch information
bluetech committed Nov 1, 2021
1 parent f8a434e commit 130dcde
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog/719.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use up-to-date ``setup.cfg``/``pyproject.toml`` packaging setup.
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[build-system]
requires = [
# sync with setup.py until we discard non-pep-517/518
"setuptools>=45.0",
"setuptools-scm[toml]>=6.2.3",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/xdist/_version.py"

[tool.towncrier]
package = "xdist"
filename = "CHANGELOG.rst"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ install_requires =
execnet>=1.1
pytest>=6.0.0
pytest-forked
setup_requires = setuptools_scm
setup_requires = setuptools_scm>=6.0

[options.packages.find]
where = src
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from setuptools import setup

if __name__ == "__main__":
setup(
use_scm_version={"write_to": "src/xdist/_version.py"},
)
setup()

0 comments on commit 130dcde

Please sign in to comment.