3 Small script to create the git tags for a release of Gaudi.
5 __author__ =
"Marco Clemencic <Marco.Clemencic@cern.ch>"
9 from subprocess
import Popen, PIPE, STDOUT
13 Generator yielding the paths of the requirements files in a tree.
15 for dirpath, dirnames, filenames
in os.walk(path):
16 if 'CMakeLists.txt' in filenames
and dirpath != path:
18 yield os.path.join(dirpath,
'CMakeLists.txt')
21 dirnames[:] = [dirname
for dirname
in dirnames
22 if not dirname.startswith(
'build.')
and
27 Extract subdir name and version from a CMakeLists.txt file.
29 pattern = re.compile(
r"^\s*gaudi_subdir\s*\(\s*(\S+)\s+(\S+)\s*\)\s*$")
30 for l
in open(cmakelists):
31 m = pattern.match(l.strip())
38 root = os.path.realpath(__file__)
39 root = os.path.dirname(root)
40 root = os.path.dirname(root)
41 root = os.path.dirname(root)
44 cmd = [
"git",
"tag",
"%s/%s" % (p, v)]
45 print " ".join(cmd) +
":",
46 git = Popen(cmd, stdout=PIPE, stderr=PIPE)
47 out, err = git.communicate()
48 if git.returncode == 0:
53 print "WARNING: no version in subdir", p
55 print "WARNING: found CMakeLists.txt with version (%s), but no subdir name" % v
57 if __name__ ==
"__main__":
struct GAUDI_API map
Parametrisation class for map-like implementation.
def getSubdirVer(cmakelists)