##// END OF EJS Templates
cleanup build process
Matthias Bussonnier -
Show More
@@ -4,7 +4,7 b''
4 import os
4 import os
5 from shutil import rmtree
5 from shutil import rmtree
6
6
7 from toollib import sh, pjoin, get_ipdir, cd, execfile, sdists, buildwheels
7 from toollib import sh, pjoin, get_ipdir, cd, sdists, buildwheels
8
8
9 def build_release():
9 def build_release():
10
10
@@ -12,13 +12,6 b' def build_release():'
12 ipdir = get_ipdir()
12 ipdir = get_ipdir()
13 cd(ipdir)
13 cd(ipdir)
14
14
15 # Load release info
16 execfile(pjoin('IPython', 'core', 'release.py'), globals())
17
18 with open('docs/source/whatsnew/index.rst') as f:
19 if ' development' in f.read():
20 raise ValueError("Please remove `development` from what's new toctree for release")
21
22 # Cleanup
15 # Cleanup
23 for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),
16 for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),
24 pjoin('docs', 'source', 'api', 'generated')]:
17 pjoin('docs', 'source', 'api', 'generated')]:
@@ -3,6 +3,7 b''
3
3
4 # Library imports
4 # Library imports
5 import os
5 import os
6 import sys
6
7
7 # Useful shorthands
8 # Useful shorthands
8 pjoin = os.path.join
9 pjoin = os.path.join
@@ -20,7 +21,7 b" archive = '%s:%s' % (archive_user, archive_dir)"
20 sdists = './setup.py sdist --formats=gztar'
21 sdists = './setup.py sdist --formats=gztar'
21 # Binary dists
22 # Binary dists
22 def buildwheels():
23 def buildwheels():
23 sh('python3 setupegg.py bdist_wheel')
24 sh('{python} setupegg.py bdist_wheel'.format(python=sys.executable))
24
25
25 # Utility functions
26 # Utility functions
26 def sh(cmd):
27 def sh(cmd):
@@ -31,9 +32,6 b' def sh(cmd):'
31 if stat:
32 if stat:
32 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
33 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
33
34
34 # Backwards compatibility
35 c = sh
36
37 def get_ipdir():
35 def get_ipdir():
38 """Get IPython directory from command line, or assume it's the one above."""
36 """Get IPython directory from command line, or assume it's the one above."""
39
37
@@ -47,9 +45,6 b' def get_ipdir():'
47 raise SystemExit('Invalid ipython directory: %s' % ipdir)
45 raise SystemExit('Invalid ipython directory: %s' % ipdir)
48 return ipdir
46 return ipdir
49
47
50 try:
48 def execfile(fname, globs, locs=None):
51 execfile = execfile
49 locs = locs or globs
52 except NameError:
50 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
53 def execfile(fname, globs, locs=None):
54 locs = locs or globs
55 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
General Comments 0
You need to be logged in to leave comments. Login now