If `setuptools_scm` is missing, hg-git gets version 0.0.0 silently.
Steps to reproduce
- Start in some environment that doesn’t have
setuptools_scm
installed. - Unpack 1.0.0 source tarball from PyPI.
- Run
python setup.py build
.
Expected result
grep '^Version:' hg_git.egg-info/PKG-INFO
should print “Version: 1.0.0”.
Actual result
grep '^Version:' hg_git.egg-info/PKG-INFO
prints “Version: 0.0.0”.
Analysis
In setup.py
, ImportError
s from import setuptools_scm
get silenced. If setuptools_scm
is not imported, no version is set.
I think that such bugs should not happen silently. Unless we find a way to make it find the correct version without setuptools_scm
, the ImportError
should to shown to the user / packager.
Edited by Manuel Jacob