diff options
author | Ronny Pfannschmidt <ronny.pfannschmidt@redhat.com> | 2020-05-02 20:03:06 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <ronny.pfannschmidt@redhat.com> | 2020-05-02 20:03:40 +0200 |
commit | ee08a2dbe7ab47217ecae6feac81ae081cb95d17 (patch) | |
tree | 5dae0a41a99c7442d6b080016164a4e970c70cf5 | |
parent | 27fae08af222998d8b6f9ed00a500a7fd6beeb02 (diff) | |
download | setuptools-scm-ee08a2dbe7ab47217ecae6feac81ae081cb95d17.tar.gz |
closes #312 - document interaction with enterprise distrosfix-312-document-enterprise-distros
-rw-r--r-- | CHANGELOG.rst | 6 | ||||
-rw-r--r-- | README.rst | 20 | ||||
-rw-r--r-- | src/setuptools_scm/hacks.py | 3 |
3 files changed, 23 insertions, 6 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6053dd9..26318dc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,14 +3,10 @@ v4.0.0 * Add ``parentdir_project_version`` to support installs from GitHub release tarballs. - -v3.5.1 -====== - * use Coordinated Universal Time (UTC) * switch to github actions for ci * fix documentation for ``tag_regex`` and add support for single digit versions - +* document handling of enterprise distros with unsupported setuptools versions #312 v3.5.0 ====== @@ -540,6 +540,26 @@ some environments require a test prior to install, $ PYTHONPATH=$PWD:$PWD/src pytest +Interaction with Enterprise Distributions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some enterprise distributions like RHEL7 and others +ship rather old setuptools versions due to various release management details. + +On such distributions one might observe errors like: + +:code:``setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)`` + +In those case its typically possible to build by using a sdist against ``setuptools_scm<2.0``. +As those old setuptools versions lack sensible types for versions, +modern setuptools_scm is unable to support them sensibly. + +In case the project you need to build can not be patched to either use old setuptools_scm, +its still possible to install a more recent version of setuptools in order to handle the build +and/or install the package by using wheels or eggs. + + + Code of Conduct --------------- diff --git a/src/setuptools_scm/hacks.py b/src/setuptools_scm/hacks.py index e0db383..349d26f 100644 --- a/src/setuptools_scm/hacks.py +++ b/src/setuptools_scm/hacks.py @@ -29,7 +29,8 @@ def fallback_version(root, config=None): _, parent_name = os.path.split(os.path.abspath(root)) if parent_name.startswith(config.parentdir_prefix_version): version = tag_to_version( - parent_name[len(config.parentdir_prefix_version) :], config) + parent_name[len(config.parentdir_prefix_version) :], config + ) if version is not None: return meta(str(version), preformatted=True, config=config) if config.fallback_version is not None: |