remove configure.configure, use __version__, remove getRevision() (#94)

* remove configure.configure, use __version__, remove getRevision()

* remove empty configure/ directory

* remove morituri.configure imports
This commit is contained in:
Samantha Baldwin
2016-12-31 10:41:18 -05:00
committed by JoeLametta
parent ee298906ac
commit 976e1bdca2
11 changed files with 21 additions and 65 deletions

View File

@@ -333,37 +333,3 @@ class VersionGetter(object):
raise
return version
def getRevision():
"""
Get a revision tag for the current git source tree.
Appends -modified in case there are local modifications.
If this is not a git tree, return the top-level REVISION contents instead.
Finally, return unknown.
"""
topsrcdir = os.path.join(os.path.dirname(__file__), '..', '..')
# only use git if our src directory looks like a git checkout
# if you run git regardless, it recurses up until it finds a .git,
# which may be higher than your current source tree
if os.path.exists(os.path.join(topsrcdir, '.git')):
# always falls back to the current commit hash if no tags are found
status, describe = commands.getstatusoutput('git describe --all')
if status == 0:
if commands.getoutput('git diff-index --name-only HEAD --'):
describe += '-modified'
return describe
# check for a top-level REVISION file
path = os.path.join(topsrcdir, 'REVISION')
if os.path.exists(path):
revision = open(path).read().strip()
return revision
return '(unknown)'