Show More
@@ -1,35 +1,49 | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | """IPython release build script. |
|
2 | """IPython release build script. | |
3 | """ |
|
3 | """ | |
|
4 | ||||
|
5 | import os | |||
|
6 | ||||
4 | from toollib import * |
|
7 | from toollib import * | |
5 |
|
8 | |||
6 | # Get main ipython dir, this will raise if it doesn't pass some checks |
|
9 | # Get main ipython dir, this will raise if it doesn't pass some checks | |
7 | ipdir = get_ipdir() |
|
10 | ipdir = get_ipdir() | |
8 | cd(ipdir) |
|
11 | cd(ipdir) | |
9 |
|
12 | |||
10 | # Load release info |
|
13 | # Load release info | |
11 | execfile(pjoin('IPython', 'core', 'release.py')) |
|
14 | execfile(pjoin('IPython', 'core', 'release.py')) | |
12 |
|
15 | |||
13 | # Check that everything compiles |
|
16 | # Check that everything compiles | |
14 | compile_tree() |
|
17 | compile_tree() | |
15 |
|
18 | |||
16 | # Cleanup |
|
19 | # Cleanup | |
17 | for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'), |
|
20 | for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'), | |
18 | pjoin('docs', 'source', 'api', 'generated')]: |
|
21 | pjoin('docs', 'source', 'api', 'generated')]: | |
19 | if os.path.isdir(d): |
|
22 | if os.path.isdir(d): | |
20 | remove_tree(d) |
|
23 | remove_tree(d) | |
21 |
|
24 | |||
22 | # Build source and binary distros |
|
25 | # Build source and binary distros | |
23 | sh('./setup.py sdist --formats=gztar,zip') |
|
26 | sh('./setup.py sdist --formats=gztar,zip') | |
24 |
|
27 | |||
25 | # Build eggs |
|
28 | # Build eggs | |
26 | sh('python ./setupegg.py bdist_egg') |
|
29 | sh('python ./setupegg.py bdist_egg') | |
27 |
|
30 | |||
28 | # Call the windows build separately, so that the extra Windows scripts don't |
|
31 | # Call the windows build separately, so that the extra Windows scripts don't | |
29 | # get pulled into Unix builds (setup.py has code which checks for |
|
32 | # get pulled into Unix builds (setup.py has code which checks for | |
30 | # bdist_wininst) |
|
33 | # bdist_wininst). Note that the install scripts args are added to the main | |
31 | sh("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") |
|
34 | # distutils call in setup.py, so they don't need to be passed here. | |
|
35 | sh("python setup.py bdist_wininst") | |||
|
36 | ||||
|
37 | # The Windows 64-bit installer can't be built by a Linux/Mac Python because ofa | |||
|
38 | # bug in distutils: http://bugs.python.org/issue6792. | |||
|
39 | # So we have to build it with a wine-installed native Windows Python... | |||
|
40 | sh("%s/.wine/dosdevices/c\:/Python27/python.exe setup.py build " | |||
|
41 | "--plat-name=win-amd64 bdist_wininst " | |||
|
42 | "--install-script=ipython_win_post_install.py" % os.environ['HOME']) | |||
32 |
|
43 | |||
33 | # Change name so retarded Vista runs the installer correctly |
|
44 | # Change name so retarded Vista runs the installer correctly | |
34 |
sh("rename 's/linux-i686/win32 |
|
45 | sh("rename 's/linux-i686/win32/' dist/*.exe") | |
35 |
sh("rename 's/linux-x86_64/win32 |
|
46 | sh("rename 's/linux-x86_64/win32/' dist/*.exe") | |
|
47 | sh("rename 's/amd64/amd64-setup/' dist/*.exe") | |||
|
48 | # exe files aren't really executable under *nix. | |||
|
49 | sh("chmod -x dist/*.exe") |
General Comments 0
You need to be logged in to leave comments.
Login now