Skip to content
Snippets Groups Projects
Verified Commit 1fa83a95 authored by Nick Curtis's avatar Nick Curtis
Browse files

fix for loading git revision from dev-tree without installed version of loopy

parent f21ed48e
Branches git_rev_fix
No related tags found
No related merge requests found
Pipeline #10905 passed with stage
in 24 minutes and 17 seconds
......@@ -29,13 +29,18 @@ if os.environ.get("AKPYTHON_EXEC_IMPORT_UNAVAILABLE") is not None:
_git_rev = None
else:
import loopy._git_rev as _git_rev_mod
_git_rev = _git_rev_mod.GIT_REVISION
try:
import loopy._git_rev as _git_rev_mod
_git_rev = _git_rev_mod.GIT_REVISION
except ImportError:
_git_rev = None
# If we're running from a dev tree, the last install (and hence the most
# recent update of the above git rev) could have taken place very long ago.
from pytools import find_module_git_revision
_runtime_git_rev = find_module_git_revision(__file__, n_levels_up=1)
if _git_rev is None and _runtime_git_rev is None:
raise Exception("Cannot determine git revision from install or dev-tree.")
if _runtime_git_rev is not None:
_git_rev = _runtime_git_rev
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment