##// END OF EJS Templates
Merge pull request #9925 from takluyver/pep527...
Min RK -
r22848:f80087f8 merge
parent child Browse files
Show More
@@ -1,56 +1,56 b''
1 1 """Various utilities common to IPython release and maintenance tools.
2 2 """
3 3 from __future__ import print_function
4 4
5 5 # Library imports
6 6 import os
7 7
8 8 # Useful shorthands
9 9 pjoin = os.path.join
10 10 cd = os.chdir
11 11
12 12 # Constants
13 13
14 14 # SSH root address of the archive site
15 15 archive_user = 'ipython@archive.ipython.org'
16 16 archive_dir = 'archive.ipython.org'
17 17 archive = '%s:%s' % (archive_user, archive_dir)
18 18
19 19 # Build commands
20 20 # Source dists
21 sdists = './setup.py sdist --formats=gztar,zip'
21 sdists = './setup.py sdist --formats=gztar'
22 22 # Binary dists
23 23 def buildwheels():
24 24 sh('python3 setupegg.py bdist_wheel' % py)
25 25
26 26 # Utility functions
27 27 def sh(cmd):
28 28 """Run system command in shell, raise SystemExit if it returns an error."""
29 29 print("$", cmd)
30 30 stat = os.system(cmd)
31 31 #stat = 0 # Uncomment this and comment previous to run in debug mode
32 32 if stat:
33 33 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
34 34
35 35 # Backwards compatibility
36 36 c = sh
37 37
38 38 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 42 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
43 43
44 44 ipdir = os.path.abspath(ipdir)
45 45
46 46 cd(ipdir)
47 47 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
48 48 raise SystemExit('Invalid ipython directory: %s' % ipdir)
49 49 return ipdir
50 50
51 51 try:
52 52 execfile = execfile
53 53 except NameError:
54 54 def execfile(fname, globs, locs=None):
55 55 locs = locs or globs
56 56 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
General Comments 0
You need to be logged in to leave comments. Login now