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.
setupcfg
juga 2 years ago
parent
commit
12c182f1ac
2 changed files with 8 additions and 2 deletions
  1. +5
    -2
      setup.cfg
  2. +3
    -0
      setup.py

+ 5
- 2
setup.cfg View File

@ -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
- 0
setup.py View File

@ -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