Show More
@@ -2,12 +2,12 b'' | |||
|
2 | 2 | """Simple script to create a tarball with proper git info. |
|
3 | 3 | """ |
|
4 | 4 | |
|
5 | import commands | |
|
5 | import subprocess | |
|
6 | 6 | import os |
|
7 | 7 | |
|
8 | 8 | from toollib import cd, sh |
|
9 | 9 | |
|
10 |
tag = |
|
|
10 | tag = subprocess.getoutput('git describe --tags') | |
|
11 | 11 | base_name = 'ipython-%s' % tag |
|
12 | 12 | tar_name = '%s.tgz' % base_name |
|
13 | 13 | |
@@ -16,7 +16,6 b" tar_name = '%s.tgz' % base_name" | |||
|
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 | start_dir = os.getcwdu() | |
|
20 | 19 | cd('..') |
|
21 | 20 | git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}' |
|
22 | 21 | sh(git_tpl.format(base_name, tar_name)) |
@@ -39,10 +39,7 b' def get_ipdir():' | |||
|
39 | 39 | """Get IPython directory from command line, or assume it's the one above.""" |
|
40 | 40 | |
|
41 | 41 | # Initialize arguments and check location |
|
42 | try: | |
|
43 | ipdir = sys.argv[1] | |
|
44 | except IndexError: | |
|
45 | ipdir = pjoin(os.path.dirname(__file__), os.pardir) | |
|
42 | ipdir = pjoin(os.path.dirname(__file__), os.pardir) | |
|
46 | 43 | |
|
47 | 44 | ipdir = os.path.abspath(ipdir) |
|
48 | 45 |
General Comments 0
You need to be logged in to leave comments.
Login now