Skip to content
Snippets Groups Projects

No import during build

Merged Daniel Hornung requested to merge f-no-import-at-build into dev
1 file
+ 4
5
Compare changes
  • Side-by-side
  • Inline
+ 4
5
@@ -97,6 +97,7 @@ def get_version_info():
FULLVERSION = VERSION
# Magic which is only really needed in the pipelines. Therefore: a lot of dark pipeline magic.
GIT_REVISION = "Unknown"
if os.path.exists('.git'):
GIT_REVISION = git_version()
elif os.path.exists('linkahead_pylib_commit'):
@@ -105,14 +106,12 @@ def get_version_info():
elif os.path.exists('src/linkahead/version.py'):
# must be a source distribution, use existing version file
with open('src/linkahead/version.py') as fi:
rev_pattern = re.compile(r"^git_revision = '(?P<rev>.*)'$")
for line in fi.readlines():
match = re.match(r"^git_revision = (?P<rev>.*)$", line)
match = rev_pattern.match(line)
if match is not None:
GIT_REVISION = match.group('rev')
else:
GIT_REVISION = "Unknown"
break
if not ISRELEASED:
FULLVERSION += '.dev0+' + GIT_REVISION[:7]
Loading