From ba1b4c20c83e1c0a1a5ac9387f9aa105f46e14c1 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 1 Jul 2020 21:04:04 +0000 Subject: [PATCH] setup: gracefully recover from missing setuptools_scm. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 19f2518..99ae4c9 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ from setuptools import setup, find_packages -from setuptools_scm.git import parse as parse_git def scm_version(): @@ -16,6 +15,11 @@ def scm_version(): def doc_version(): + try: + from setuptools_scm.git import parse as parse_git + except ImportError: + return "" + git = parse_git(".") if git.exact: return git.format_with("{tag}") -- 2.30.2