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.
master
juga 5 years ago
parent
commit
12c182f1ac
  1. 7
      setup.cfg
  2. 3
      setup.py

7
setup.cfg

@ -1,7 +1,5 @@
[metadata]
name = pEp
#TODO: automate version pull from hg/git
version = 2.2.0-RC1
url = https://pep.foundation
download_url =
ext_package = pEp
@ -33,6 +31,11 @@ python_requires = >= 3.6
test_suite = tests
setup_requires =
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 =
setuptools >=38.3.0
tests_require =

3
setup.py

@ -223,4 +223,7 @@ setup(
cmdclass={
'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