##// END OF EJS Templates
more py3 fixes for release scripts
Min RK -
Show More
@@ -2,12 +2,12 b''
2 """Simple script to create a tarball with proper git info.
2 """Simple script to create a tarball with proper git info.
3 """
3 """
4
4
5 import commands
5 import subprocess
6 import os
6 import os
7
7
8 from toollib import cd, sh
8 from toollib import cd, sh
9
9
10 tag = commands.getoutput('git describe --tags')
10 tag = subprocess.getoutput('git describe --tags')
11 base_name = 'ipython-%s' % tag
11 base_name = 'ipython-%s' % tag
12 tar_name = '%s.tgz' % base_name
12 tar_name = '%s.tgz' % base_name
13
13
@@ -16,7 +16,6 b" tar_name = '%s.tgz' % base_name"
16 # to the top of the tree. There are long threads (since 2007) on the git list
16 # to the top of the tree. There are long threads (since 2007) on the git list
17 # about this and it still doesn't work in a sensible way...
17 # about this and it still doesn't work in a sensible way...
18
18
19 start_dir = os.getcwdu()
20 cd('..')
19 cd('..')
21 git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}'
20 git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}'
22 sh(git_tpl.format(base_name, tar_name))
21 sh(git_tpl.format(base_name, tar_name))
@@ -39,10 +39,7 b' def get_ipdir():'
39 """Get IPython directory from command line, or assume it's the one above."""
39 """Get IPython directory from command line, or assume it's the one above."""
40
40
41 # Initialize arguments and check location
41 # Initialize arguments and check location
42 try:
42 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
43 ipdir = sys.argv[1]
44 except IndexError:
45 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
46
43
47 ipdir = os.path.abspath(ipdir)
44 ipdir = os.path.abspath(ipdir)
48
45
General Comments 0
You need to be logged in to leave comments. Login now