Skip to content

Commit

Permalink
Merge pull request #7598 from nicoddemus/setuptools-scm-pyproject
Browse files Browse the repository at this point in the history
Configure setuptools_scm using pyproject.toml
  • Loading branch information
asottile committed Aug 2, 2020
2 parents be354b3 + d1fa749 commit 701998b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

python:
version: 3.7
install:
- requirements: doc/en/requirements.txt
- method: pip
path: .

formats:
- epub
- pdf
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[build-system]
requires = [
# sync with setup.py until we discard non-pep-517/518
"setuptools>=40.0",
"setuptools-scm",
"setuptools>=42.0",
"setuptools-scm[toml]>=3.4",
"wheel",
]
build-backend = "setuptools.build_meta"

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

[tool.pytest.ini_options]
minversion = "2.0"
addopts = "-rfEX -p pytester --strict-markers"
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
from setuptools import setup


def main():
setup(use_scm_version={"write_to": "src/_pytest/_version.py"})


if __name__ == "__main__":
main()
setup()

0 comments on commit 701998b

Please sign in to comment.