##// END OF EJS Templates
Improve build script....
Matthias Bussonnier -
Show More
@@ -15,7 +15,7 b' cd(ipdir)'
15 execfile(pjoin('IPython', 'core', 'release.py'), globals())
15 execfile(pjoin('IPython', 'core', 'release.py'), globals())
16
16
17 # Check that everything compiles
17 # Check that everything compiles
18 compile_tree()
18 compile_tree('*')
19
19
20 # Cleanup
20 # Cleanup
21 for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),
21 for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),
@@ -8,7 +8,7 b' from __future__ import print_function'
8 import os
8 import os
9 import sys
9 import sys
10
10
11 from toollib import (get_ipdir, pjoin, cd, execfile, version, sh, archive,
11 from toollib import (get_ipdir, pjoin, cd, execfile, sh, archive,
12 sdists, archive_user, archive_dir)
12 sdists, archive_user, archive_dir)
13 from gh_api import post_download
13 from gh_api import post_download
14
14
@@ -26,6 +26,7 b' if not os.path.exists(ipbackupdir):'
26 cd(ipdir)
26 cd(ipdir)
27
27
28 # Load release info
28 # Load release info
29 version = None
29 execfile(pjoin('IPython','core','release.py'), globals())
30 execfile(pjoin('IPython','core','release.py'), globals())
30
31
31 # Build site addresses for file uploads
32 # Build site addresses for file uploads
@@ -50,18 +51,19 b" sh('mv ipython-*.tgz %s' % ipbackupdir)"
50 # Build release files
51 # Build release files
51 sh('./build_release %s' % ipdir)
52 sh('./build_release %s' % ipdir)
52
53
53 if 'upload' not in sys.argv:
54 print("`./release upload` to register and release")
55 sys.exit(0)
56
57 # Not Registering with PyPI, registering with setup.py is insecure as communication is not encrypted
54 # Not Registering with PyPI, registering with setup.py is insecure as communication is not encrypted
58 cd(ipdir)
55 cd(ipdir)
59
56
60 # Upload all files
57 # Upload all files
61 sh(sdists)
58 sh(sdists)
62 for py in ('2.7', '3.4'):
59 for py in ('2', '3'):
63 sh('python%s setupegg.py bdist_wheel' % py)
60 sh('python%s setupegg.py bdist_wheel' % py)
64
61
62 if 'upload' not in sys.argv:
63 print("`./release upload` to register and release")
64 sys.exit(0)
65
66
65 print('Will not upload with setuptools as upload connection is insecure. Please use `twine upload dist/*` to upload the files to PyPI')
67 print('Will not upload with setuptools as upload connection is insecure. Please use `twine upload dist/*` to upload the files to PyPI')
66
68
67 cd(distdir)
69 cd(distdir)
@@ -48,9 +48,9 b' def get_ipdir():'
48 return ipdir
48 return ipdir
49
49
50
50
51 def compile_tree():
51 def compile_tree(folder='.'):
52 """Compile all Python files below current directory."""
52 """Compile all Python files below current directory."""
53 stat = os.system('python -m compileall .')
53 stat = os.system('python -m compileall {}'.format(folder))
54 if stat:
54 if stat:
55 msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
55 msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
56 msg += 'See messages above for the actual file that produced it.\n'
56 msg += 'See messages above for the actual file that produced it.\n'
General Comments 0
You need to be logged in to leave comments. Login now