diff --git a/setup.cfg b/setup.cfg index 7e82510..105445f 100644 --- a/setup.cfg +++ b/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 = diff --git a/setup.py b/setup.py index 1d563c5..7884d27 100644 --- a/setup.py +++ b/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, )