##// END OF EJS Templates
make_tarball now creates the tarball from bzr with rev & branch info
Ville M. Vainio -
Show More
@@ -22,7 +22,7 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 revision = '46'
25 revision = '54'
26 26
27 27 version = '0.8.3.bzr.r' + revision
28 28
@@ -1,12 +1,7 b''
1 1 import os,sys,shutil
2 2
3 repo = "http://ipython.scipy.org/svn/ipython/ipython/branches/0.7.3"
4 basename = 'ipython'
5 workdir = './mkdist'
6
7 workdir = os.path.abspath(workdir)
3 basever = '0.8.3'
8 4
9 print "working at",workdir
10 5 def oscmd(c):
11 6 print ">",c
12 7 s = os.system(c)
@@ -14,15 +9,24 b' def oscmd(c):'
14 9 print "Error",s
15 10 sys.exit(s)
16 11
12 def verinfo():
13
14 out = os.popen('bzr version-info')
15 pairs = (l.split(':',1) for l in out)
16 d = dict(((k,v.strip()) for (k,v) in pairs))
17 return d
18
19 basename = 'ipython'
20
21 #tarname = '%s.r%s.tgz' % (basename, ver)
22 oscmd('update_revnum.py')
23
24 ver = verinfo()
25
26 if ver['branch-nick'] == 'ipython':
27 tarname = 'ipython-%s.bzr.r%s.tgz' % (basever, ver['revno'])
28 else:
29 tarname = 'ipython-%s.bzr.r%s.%s.tgz' % (basever, ver['revno'], ver['branch-nick'])
17 30
18 assert not os.path.isdir(workdir)
19 os.mkdir(workdir)
20 os.chdir(workdir)
31 oscmd('bzr export ' + tarname)
21 32
22 oscmd('svn export %s %s' % (repo,basename))
23 ver = os.popen('svnversion ../..').read().strip()
24 tarname = '%s.r%s.tgz' % (basename, ver)
25 oscmd('tar czvf ../%s %s' % (tarname, basename))
26 print "Produced: ",os.path.abspath('../' + tarname)
27 os.chdir('/')
28 shutil.rmtree(workdir)
General Comments 0
You need to be logged in to leave comments. Login now