Skip to content

Commit 09265eb

Browse files
committed
Configure setuptools_scm using pyproject.toml
1 parent a1ba8df commit 09265eb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
requires = [
33
# sync with setup.py until we discard non-pep-517/518
44
"setuptools>=40.0",
5-
"setuptools-scm",
5+
"setuptools-scm>=3.4",
66
"wheel",
77
]
88
build-backend = "setuptools.build_meta"
99

10+
[tool.setuptools_scm]
11+
write_to = "src/_pytest/_version.py"
12+
1013
[tool.pytest.ini_options]
1114
minversion = "2.0"
1215
addopts = "-rfEX -p pytester --strict-markers"

setup.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
from setuptools import setup
22

3-
4-
def main():
5-
setup(use_scm_version={"write_to": "src/_pytest/_version.py"})
6-
7-
83
if __name__ == "__main__":
9-
main()
4+
setup()

0 commit comments

Comments
 (0)