##// END OF EJS Templates
Python 2 fix in make_tarball.py
Min RK -
Show More
@@ -1,22 +1,22 b''
1 1 #!/usr/bin/env python
2 2 """Simple script to create a tarball with proper git info.
3 3 """
4 4
5 5 import subprocess
6 6 import os
7 7
8 8 from toollib import cd, sh
9 9
10 tag = subprocess.getoutput('git describe --tags')
10 tag = subprocess.check_output('git describe --tags', shell=True).decode('utf8', 'replace').strip()
11 11 base_name = 'ipython-%s' % tag
12 12 tar_name = '%s.tgz' % base_name
13 13
14 14 # git archive is weird: Even if I give it a specific path, it still won't
15 15 # archive the whole tree. It seems the only way to get the whole tree is to cd
16 16 # to the top of the tree. There are long threads (since 2007) on the git list
17 17 # about this and it still doesn't work in a sensible way...
18 18
19 19 cd('..')
20 20 git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}'
21 21 sh(git_tpl.format(base_name, tar_name))
22 22 sh('mv {0} tools/'.format(tar_name))
General Comments 0
You need to be logged in to leave comments. Login now