make_tarball.py
32 lines
| 652 B
| text/x-python
|
PythonLexer
/ tools / make_tarball.py
ville
|
r988 | import os,sys,shutil | ||
Ville M. Vainio
|
r1068 | basever = '0.8.3' | ||
ville
|
r988 | |||
def oscmd(c): | ||||
print ">",c | ||||
s = os.system(c) | ||||
if s: | ||||
print "Error",s | ||||
sys.exit(s) | ||||
Ville M. Vainio
|
r1068 | def verinfo(): | ||
out = os.popen('bzr version-info') | ||||
pairs = (l.split(':',1) for l in out) | ||||
d = dict(((k,v.strip()) for (k,v) in pairs)) | ||||
return d | ||||
basename = 'ipython' | ||||
#tarname = '%s.r%s.tgz' % (basename, ver) | ||||
oscmd('update_revnum.py') | ||||
ver = verinfo() | ||||
ville
|
r988 | |||
Ville M. Vainio
|
r1068 | if ver['branch-nick'] == 'ipython': | ||
tarname = 'ipython-%s.bzr.r%s.tgz' % (basever, ver['revno']) | ||||
else: | ||||
tarname = 'ipython-%s.bzr.r%s.%s.tgz' % (basever, ver['revno'], ver['branch-nick']) | ||||
oscmd('bzr export ' + tarname) | ||||
ville
|
r988 | |||