Skip to content

Commit 701998b

Browse files
authored
Merge pull request #7598 from nicoddemus/setuptools-scm-pyproject
Configure setuptools_scm using pyproject.toml
2 parents be354b3 + d1fa749 commit 701998b

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

.readthedocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
python:
4+
version: 3.7
5+
install:
6+
- requirements: doc/en/requirements.txt
7+
- method: pip
8+
path: .
9+
10+
formats:
11+
- epub
12+
- pdf

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
[build-system]
22
requires = [
33
# sync with setup.py until we discard non-pep-517/518
4-
"setuptools>=40.0",
5-
"setuptools-scm",
4+
"setuptools>=42.0",
5+
"setuptools-scm[toml]>=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

Lines changed: 1 addition & 6 deletions
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)