Browse Source

Obtain package version from SCM

It can be tested with `python setup.py version`.
Note that it's needed to add a tag that conforms semantic versioning.
pull/2/head
juga 5 years ago
parent
commit
12c182f1ac
  1. 7
      setup.cfg
  2. 3
      setup.py

7
setup.cfg

@ -1,7 +1,5 @@
[metadata] [metadata]
name = pEp name = pEp
#TODO: automate version pull from hg/git
version = 2.2.0-RC1
url = https://pep.foundation url = https://pep.foundation
download_url = download_url =
ext_package = pEp ext_package = pEp
@ -33,6 +31,11 @@ python_requires = >= 3.6
test_suite = tests test_suite = tests
setup_requires = setup_requires =
setuptools >=38.3.0 setuptools >=38.3.0
# To automatically write the version from a SCM.
# Note: It fails with tags named as `Release_2.2.0-RC0`, because it is
# not conforming to semantic versioning, but it succeed with tags as
# `2.2.0-rc0`.
setuptools_scm
install_requires = install_requires =
setuptools >=38.3.0 setuptools >=38.3.0
tests_require = tests_require =

3
setup.py

@ -223,4 +223,7 @@ setup(
cmdclass={ cmdclass={
'build_ext': BuildExtCommand, 'build_ext': BuildExtCommand,
}, },
# While not using a pyproject.toml, support setuptools_scm setup.cfg usage,
# see https://github.com/pypa/setuptools_scm/#setupcfg-usage
use_scm_version=True,
) )

Loading…
Cancel
Save