Skip to content

Commit

Permalink
don't raise for git_revision exception in setup.py'
Browse files Browse the repository at this point in the history
  • Loading branch information
glyg committed Jan 12, 2019
1 parent dc27902 commit 5ace162
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import platform
import subprocess
import warnings

from distutils.version import LooseVersion
from setuptools import setup, find_packages, Extension
Expand Down Expand Up @@ -67,12 +68,14 @@ def get_version_info():
# must be a source distribution, use existing version file
try:
from tyssue.version import git_revision as GIT_REVISION
except ImportError:
raise ImportError(
except (ImportError, ModuleNotFoundError):
warnings.warn(
"Unable to import git_revision. Try removing "
"tyssue/version.py and the build directory "
"before building."
)
GIT_REVISION = ""

else:
GIT_REVISION = "Unknown"

Expand Down

0 comments on commit 5ace162

Please sign in to comment.