Browse Source

add upper version constraint for setuptools-scm to fix `pipenv sync` on python3.4

Fabian Peter Hammerle 3 years ago
parent
commit
b783be5e23
2 changed files with 8 additions and 1 deletions
  1. 3 0
      CHANGELOG.md
  2. 5 1
      setup.py

+ 3 - 0
CHANGELOG.md

@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Fixed
+- add upper version constraint for setuptools-scm to fix `pipenv sync` on python3.4
+  (workaround `pipenv` ignoring `setuptools-scm`'s python version requirement)
 
 ## [0.2.1] - 2019-12-30
 ### Added

+ 5 - 1
setup.py

@@ -49,6 +49,10 @@ setuptools.setup(
         ],
     },
     install_requires=[],
-    setup_requires=["setuptools_scm"],
+    # workaround pipenv ignoring setuptools-scm's python version requirement
+    # https://github.com/pypa/setuptools_scm/blob/v6.0.0/setup.cfg#L31
+    # https://github.com/pypa/setuptools_scm/commit/a16bae72c89c8ebebdb66d91f22bc2673b919070#diff-cfca63f0fb5632710d835abfc6665a033235fd9f92a81d25cb6fad0873ffe2b6R42
+    # https://travis-ci.org/github/fphammerle/free-disk/jobs/766438074#L237
+    setup_requires=["setuptools_scm<6"],
     tests_require=["pytest"],
 )