From: whitequark Date: Wed, 1 Jul 2020 21:04:04 +0000 (+0000) Subject: setup: gracefully recover from missing setuptools_scm. X-Git-Tag: 24jan2021_ls180~50 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba1b4c20c83e1c0a1a5ac9387f9aa105f46e14c1;p=nmigen.git setup: gracefully recover from missing setuptools_scm. --- 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}")