Configure setuptools_scm using pyproject.toml

This commit is contained in:
Bruno Oliveira 2020-07-31 15:46:02 -03:00
parent a1ba8dfe2a
commit 09265eb7c7
2 changed files with 5 additions and 7 deletions

View File

@ -2,11 +2,14 @@
requires = [ requires = [
# sync with setup.py until we discard non-pep-517/518 # sync with setup.py until we discard non-pep-517/518
"setuptools>=40.0", "setuptools>=40.0",
"setuptools-scm", "setuptools-scm>=3.4",
"wheel", "wheel",
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "src/_pytest/_version.py"
[tool.pytest.ini_options] [tool.pytest.ini_options]
minversion = "2.0" minversion = "2.0"
addopts = "-rfEX -p pytester --strict-markers" addopts = "-rfEX -p pytester --strict-markers"

View File

@ -1,9 +1,4 @@
from setuptools import setup from setuptools import setup
def main():
setup(use_scm_version={"write_to": "src/_pytest/_version.py"})
if __name__ == "__main__": if __name__ == "__main__":
main() setup()