Skip to content

Commit 65603bd

Browse files
committed
Fix case of missing setuptools_scm
1 parent e6a56b1 commit 65603bd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ doctest_optionflags =
4646
text_file_format = rst
4747
addopts = --doctest-rst
4848
xfail_strict = true
49+
norecursedirs = 'erfa/_dev'
4950

5051
[flake8]
5152
max-line-length = 100

setup.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,13 @@ def get_extensions():
148148
scm_version = types.ModuleType('scm_version')
149149
scm_version.__file__ = 'erfa/_dev/scm_version.py'
150150
code = compile(source, scm_version.__file__, 'exec')
151-
exec(code, scm_version.__dict__)
152-
guess_next_dev = functools.partial(scm_version._guess_next_dev,
153-
liberfadir=LIBERFADIR)
151+
try:
152+
exec(code, scm_version.__dict__)
153+
except ImportError:
154+
guess_next_dev = None
155+
else:
156+
guess_next_dev = functools.partial(scm_version._guess_next_dev,
157+
liberfadir=LIBERFADIR)
154158

155159
use_scm_version = {
156160
'write_to': os.path.join('erfa', '_version.py'),

0 commit comments

Comments
 (0)