setup: gracefully recover from missing setuptools_scm.
This commit is contained in:
parent
d5d3bc4b1a
commit
ba1b4c20c8
6
setup.py
6
setup.py
|
@ -1,5 +1,4 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from setuptools_scm.git import parse as parse_git
|
|
||||||
|
|
||||||
|
|
||||||
def scm_version():
|
def scm_version():
|
||||||
|
@ -16,6 +15,11 @@ def scm_version():
|
||||||
|
|
||||||
|
|
||||||
def doc_version():
|
def doc_version():
|
||||||
|
try:
|
||||||
|
from setuptools_scm.git import parse as parse_git
|
||||||
|
except ImportError:
|
||||||
|
return ""
|
||||||
|
|
||||||
git = parse_git(".")
|
git = parse_git(".")
|
||||||
if git.exact:
|
if git.exact:
|
||||||
return git.format_with("{tag}")
|
return git.format_with("{tag}")
|
||||||
|
|
Loading…
Reference in a new issue