1
2 """
3 Collection of core python modules for running Grid IceTray based jobs in
4 a grid environment
5
6 @version: 0.1.1
7 @date: Wed Aug 27 18:45:26 CDT 2008
8 @author: Juan Carlos Diaz Velez <juancarlos@icecube.wisc.edu>
9 """
10 import os
11
12 __version__ = '0.1.2'
13
14 -def zipfile(fmt= "iceprod-%(version)s"):
15 vars = {'version':__version__, 'platform':os.uname()[0],'arch': os.uname()[4]}
16 return fmt % vars
17
18 -def mktar(libdir,outfile):
19 tmpdir = os.path.join('/tmp',os.path.basename(outfile))
20 curdir = os.getcwd()
21 os.chdir(libdir)
22 os.system("zip -q -r %s.zip *" % outfile)
23 os.chdir(curdir)
24