3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00
dft_tools/pytriqs/version.py.in
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

29 lines
761 B
Python

VersionNumber = "1.0"
# if we use a git clone, then tag with the hash, else just the plain number
git_hash = "@GIT_HASH@"
branch_info_all = [ b.strip() for b in """@GIT_BRANCHES@""".split('\n')]
try :
branch_info = [ b[1:].strip() for b in branch_info_all if b[0] == '*'][0]
except :
branch_info = ""
revision = "branch = %s; commit = %s"%(branch_info, git_hash if git_hash else VersionNumber)
def cmake_options() :
return open ("@CMAKE_BINARY_DIR@/CMakeCache.txt").read()
machine_info = """Code compiled on @myHostName@ under login @WhoAmI@ """
all_info = """
Code revision : %s
%s
For all the configuration options, use cmake_options()
"""%(revision,machine_info)
greeting = """ Code revision : %s """%(revision)