Show More
@@ -1,14 +1,12 b'' | |||
|
1 | 1 | #!/usr/bin/env python |
|
2 | 2 | """Wrapper to run setup.py using setuptools.""" |
|
3 | 3 | |
|
4 | 4 | import sys |
|
5 | 5 | |
|
6 | 6 | # now, import setuptools and call the actual setup |
|
7 | 7 | import setuptools |
|
8 | # print sys.argv | |
|
9 | #sys.argv=['','bdist_egg'] | |
|
10 | 8 | execfile('setup.py') |
|
11 | 9 | |
|
12 | 10 | # clean up the junk left around by setuptools |
|
13 | 11 | if "develop" not in sys.argv: |
|
14 | 12 | os.system('rm -rf ipython.egg-info build') |
@@ -1,42 +1,42 b'' | |||
|
1 | 1 | #!/usr/bin/env python |
|
2 | 2 | """IPython release build script. |
|
3 | 3 | """ |
|
4 | 4 | from toollib import * |
|
5 | 5 | |
|
6 | 6 | # Get main ipython dir, this will raise if it doesn't pass some checks |
|
7 | 7 | ipdir = get_ipdir() |
|
8 | 8 | cd(ipdir) |
|
9 | 9 | |
|
10 | 10 | # Load release info |
|
11 | 11 | execfile(pjoin('IPython','Release.py')) |
|
12 | 12 | |
|
13 | 13 | # Check that everything compiles |
|
14 | 14 | compile_tree() |
|
15 | 15 | |
|
16 | 16 | # Cleanup |
|
17 | 17 | for d in ['build','dist',pjoin('docs','build'),pjoin('docs','dist')]: |
|
18 | 18 | if os.path.isdir(d): |
|
19 | 19 | remove_tree(d) |
|
20 | 20 | |
|
21 | 21 | # Build source and binary distros |
|
22 | 22 | c('./setup.py sdist --formats=gztar') |
|
23 | 23 | |
|
24 | 24 | # Build version-specific RPMs, where we must use the --python option to ensure |
|
25 | 25 | # that the resulting RPM is really built with the requested python version (so |
|
26 | 26 | # things go to lib/python2.X/...) |
|
27 | 27 | c("python2.5 ./setup.py bdist_rpm --binary-only --release=py25 " |
|
28 | 28 | "--python=/usr/bin/python2.5") |
|
29 | 29 | c("python2.6 ./setup.py bdist_rpm --binary-only --release=py26 " |
|
30 | 30 | "--python=/usr/bin/python2.6") |
|
31 | 31 | |
|
32 | 32 | # Build eggs |
|
33 |
c('python2.5 ./ |
|
|
34 |
c('python2.6 ./ |
|
|
33 | c('python2.5 ./setupegg.py bdist_egg') | |
|
34 | c('python2.6 ./setupegg.py bdist_egg') | |
|
35 | 35 | |
|
36 | 36 | # Call the windows build separately, so that the extra Windows scripts don't |
|
37 | 37 | # get pulled into Unix builds (setup.py has code which checks for |
|
38 | 38 | # bdist_wininst) |
|
39 | 39 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") |
|
40 | 40 | |
|
41 | 41 | # Change name so retarded Vista runs the installer correctly |
|
42 | 42 | c("rename 's/win32/win32-setup/' dist/*.exe") |
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | """Various utilities common to IPython release and maintenance tools. |
|
2 | 2 | """ |
|
3 | 3 | # Library imports |
|
4 | 4 | import os |
|
5 | 5 | import sys |
|
6 | 6 | |
|
7 | 7 | from distutils.dir_util import remove_tree |
|
8 | 8 | |
|
9 | 9 | # Useful shorthands |
|
10 | 10 | pjoin = os.path.join |
|
11 | 11 | cd = os.chdir |
|
12 | 12 | |
|
13 | 13 | # Utility functions |
|
14 | 14 | def c(cmd): |
|
15 | 15 | """Run system command, raise SystemExit if it returns an error.""" |
|
16 | 16 | print "$",cmd |
|
17 |
|
|
|
18 | stat = 0 # Uncomment this and comment previous to run in debug mode | |
|
17 | stat = os.system(cmd) | |
|
18 | #stat = 0 # Uncomment this and comment previous to run in debug mode | |
|
19 | 19 | if stat: |
|
20 | 20 | raise SystemExit("Command %s failed with code: %s" % (cmd, stat)) |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def get_ipdir(): |
|
24 | 24 | """Get IPython directory from command line, or assume it's the one above.""" |
|
25 | 25 | |
|
26 | 26 | # Initialize arguments and check location |
|
27 | 27 | try: |
|
28 | 28 | ipdir = sys.argv[1] |
|
29 | 29 | except IndexError: |
|
30 | 30 | ipdir = '..' |
|
31 | 31 | |
|
32 | 32 | ipdir = os.path.abspath(ipdir) |
|
33 | 33 | |
|
34 | 34 | cd(ipdir) |
|
35 | 35 | if not os.path.isdir('IPython') and os.path.isfile('setup.py'): |
|
36 | 36 | raise SystemExit('Invalid ipython directory: %s' % ipdir) |
|
37 | 37 | return ipdir |
|
38 | 38 | |
|
39 | 39 | |
|
40 | 40 | def compile_tree(): |
|
41 | 41 | """Compile all Python files below current directory.""" |
|
42 | 42 | vstr = '.'.join(map(str,sys.version_info[:2])) |
|
43 | 43 | stat = os.system('python %s/lib/python%s/compileall.py .' % |
|
44 | 44 | (sys.prefix,vstr)) |
|
45 | 45 | if stat: |
|
46 | 46 | msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n' |
|
47 | 47 | msg += 'See messages above for the actual file that produced it.\n' |
|
48 | 48 | raise SystemExit(msg) |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | def version_info(): |
|
52 | 52 | """Return bzr version info as a dict.""" |
|
53 | 53 | out = os.popen('bzr version-info') |
|
54 | 54 | pairs = (l.split(':',1) for l in out) |
|
55 | 55 | return dict(((k,v.strip()) for (k,v) in pairs)) |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now