summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2020-05-02 20:10:35 +0200
committerGitHub <noreply@github.com>2020-05-02 20:10:35 +0200
commit213c9c82ec28b4889dbfa060c7093bd70711e189 (patch)
tree5dae0a41a99c7442d6b080016164a4e970c70cf5
parent27fae08af222998d8b6f9ed00a500a7fd6beeb02 (diff)
parentee08a2dbe7ab47217ecae6feac81ae081cb95d17 (diff)
downloadsetuptools-scm-213c9c82ec28b4889dbfa060c7093bd70711e189.tar.gz
Merge pull request #422 from pypa/fix-312-document-enterprise-distros
closes #312 - document interaction with enterprise distros
-rw-r--r--CHANGELOG.rst6
-rw-r--r--README.rst20
-rw-r--r--src/setuptools_scm/hacks.py3
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
======
diff --git a/README.rst b/README.rst
index 1d1e90e..bae5db2 100644
--- a/README.rst
+++ b/README.rst
@@ -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: