##// END OF EJS Templates
integrate fernandos 0.8.3 release changes to original trunk
Ville M. Vainio -
r1209:cabe8467 merge
parent child Browse files
Show More
@@ -3140,7 +3140,7 b' Defaulting color scheme to \'NoColor\'"""'
3140 3140 screen_lines=self.shell.rc.screen_length)
3141 3141
3142 3142 def magic_cpaste(self, parameter_s=''):
3143 """Allows you to paste & execute a pre-formatted code block from clipboard
3143 """Allows you to paste & execute a pre-formatted code block from clipboard.
3144 3144
3145 3145 You must terminate the block with '--' (two minus-signs) alone on the
3146 3146 line. You can also provide your own sentinel with '%paste -s %%' ('%%'
@@ -3148,8 +3148,9 b' Defaulting color scheme to \'NoColor\'"""'
3148 3148
3149 3149 The block is dedented prior to execution to enable execution of method
3150 3150 definitions. '>' and '+' characters at the beginning of a line are
3151 ignored, to allow pasting directly from e-mails, diff files and doctests.
3152 The executed block is also assigned to variable named 'pasted_block' for
3151 ignored, to allow pasting directly from e-mails, diff files and
3152 doctests (the '...' continuation prompt is also stripped). The
3153 executed block is also assigned to variable named 'pasted_block' for
3153 3154 later editing with '%edit pasted_block'.
3154 3155
3155 3156 You can also pass a variable name as an argument, e.g. '%cpaste foo'.
@@ -3166,8 +3167,15 b' Defaulting color scheme to \'NoColor\'"""'
3166 3167 par = args.strip()
3167 3168 sentinel = opts.get('s','--')
3168 3169
3169 strip_from_start = [re.compile(e) for e in
3170 [r'^\s*(\s?>)+',r'^\s*In \[\d+\]:',r'^\++']]
3170 # Regular expressions that declare text we strip from the input:
3171 strip_re = [r'^\s*In \[\d+\]:', # IPython input prompt
3172 r'^\s*(\s?>)+', # Python input prompt
3173 r'^\s*\.{3,}', # Continuation prompts
3174 r'^\++',
3175 ]
3176
3177 strip_from_start = map(re.compile,strip_re)
3178
3171 3179 from IPython import iplib
3172 3180 lines = []
3173 3181 print "Pasting code; enter '%s' alone on the line to stop." % sentinel
@@ -22,7 +22,7 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 revision = '117'
25 revision = '85'
26 26 branch = 'ipython'
27 27
28 28 if branch == 'ipython':
@@ -377,8 +377,8 b' class ListTB(TBTools):'
377 377
378 378 def __call__(self, etype, value, elist):
379 379 Term.cout.flush()
380 Term.cerr.flush()
381 380 print >> Term.cerr, self.text(etype,value,elist)
381 Term.cerr.flush()
382 382
383 383 def text(self,etype, value, elist,context=5):
384 384 """Return a color formatted string with the traceback info."""
@@ -855,8 +855,8 b' class VerboseTB(TBTools):'
855 855 (etype, evalue, etb) = info or sys.exc_info()
856 856 self.tb = etb
857 857 Term.cout.flush()
858 Term.cerr.flush()
859 858 print >> Term.cerr, self.text(etype, evalue, etb)
859 Term.cerr.flush()
860 860
861 861 # Changed so an instance can just be called as VerboseTB_inst() and print
862 862 # out the right info on its own.
@@ -977,13 +977,13 b' class AutoFormattedTB(FormattedTB):'
977 977 if out is None:
978 978 out = Term.cerr
979 979 Term.cout.flush()
980 out.flush()
981 980 if tb_offset is not None:
982 981 tb_offset, self.tb_offset = self.tb_offset, tb_offset
983 982 print >> out, self.text(etype, evalue, etb)
984 983 self.tb_offset = tb_offset
985 984 else:
986 985 print >> out, self.text(etype, evalue, etb)
986 out.flush()
987 987 try:
988 988 self.debugger()
989 989 except KeyboardInterrupt:
@@ -9,28 +9,23 b' graft setupext'
9 9 graft IPython/UserConfig
10 10
11 11 graft doc
12 exclude doc/\#*
12 13 exclude doc/*.1
13 exclude doc/manual_base*
14 14 exclude doc/ChangeLog.*
15 exclude doc/\#*
16 exclude doc/update_magic.sh
17 15 exclude doc/update_version.sh
18 exclude doc/manual_base*
19 exclude doc/manual/WARNINGS
20 exclude doc/manual/*.aux
21 exclude doc/manual/*.log
22 exclude doc/manual/*.out
23 exclude doc/manual/*.pl
24 exclude doc/manual/*.tex
16
17 # There seems to be no way of excluding whole subdirectories, other than
18 # manually excluding all their subdirs. distutils really is horrible...
19 exclude doc/attic/*
25 20 exclude doc/build/doctrees/*
26 exclude doc/build/latex/*
27 21 exclude doc/build/html/_sources/*
28
29
30
22 exclude doc/build/html/_static/*
23 exclude doc/build/html/*
24 exclude doc/build/latex/*
31 25
32 26 global-exclude *~
33 27 global-exclude *.flc
34 28 global-exclude *.pyc
35 29 global-exclude .dircopy.log
36 30 global-exclude .svn
31 global-exclude .bzr
@@ -1,3 +1,20 b''
1 2008-05-28 *** Released version 0.8.3
2
3 2008-05-28 Fernando Perez <Fernando.Perez@berkeley.edu>
4
5 * ../win32_manual_post_install.py (run): Fix the windows installer
6 so the links to the docs are correct.
7
8 * IPython/ultraTB.py: flush stderr after writing to it to fix
9 problems with exception traceback ordering in some platforms.
10 Thanks to a report/fix by Jie Tang <jietang86-AT-gmail.com>.
11
12 * IPython/Magic.py (magic_cpaste): add stripping of continuation
13 prompts, feature requested by Stefan vdW.
14
15 * ../setup.py: updates to build and release tools in preparation
16 for 0.8.3 release.
17
1 18 2008-05-27 Ville Vainio <vivainio@gmail.com>
2 19
3 20 * iplib.py, ipmaker.py: survive lack of doctest and site._Helper
1 NO CONTENT: file renamed from doc/ipnb_google_soc.lyx to doc/attic/ipnb_google_soc.lyx
1 NO CONTENT: file renamed from doc/nbexample.py to doc/attic/nbexample.py
1 NO CONTENT: file renamed from doc/nbexample_latex.py to doc/attic/nbexample_latex.py
1 NO CONTENT: file renamed from doc/nbexample_output.py to doc/attic/nbexample_output.py
1 NO CONTENT: file renamed from doc/new_design.lyx to doc/attic/new_design.lyx
@@ -1,3 +1,7 b''
1 #!/usr/bin/env python
2 """Script to build documentation using Sphinx.
3 """
4
1 5 import fileinput,os,sys
2 6
3 7 def oscmd(c):
@@ -11,6 +15,7 b" if sys.platform != 'win32':"
11 15 oscmd('sphinx-build -b latex -d build/doctrees source build/latex')
12 16
13 17 # Produce pdf.
18 topdir = os.getcwd()
14 19 os.chdir('build/latex')
15 20
16 21 # Change chapter style to section style: allows chapters to start on
@@ -60,5 +65,10 b" if sys.platform != 'win32':"
60 65 oscmd('makeindex -s python.ist modipython.idx')
61 66 oscmd('pdflatex ipython.tex')
62 67 oscmd('pdflatex ipython.tex')
63 oscmd('cp ipython.pdf ../html')
64 os.chdir('../..')
68
69 # Create a manual/ directory with final html/pdf output
70 os.chdir(topdir)
71 oscmd('rm -rf manual')
72 oscmd('mkdir manual')
73 oscmd('cp -r build/html/*.html build/html/_static manual/')
74 oscmd('cp build/latex/ipython.pdf manual/')
@@ -4,7 +4,7 b''
4 4
5 5 Under Posix environments it works like a typical setup.py script.
6 6 Under Windows, the command sdist is not supported, since IPython
7 requires utilities, which are not available under Windows."""
7 requires utilities which are not available under Windows."""
8 8
9 9 #*****************************************************************************
10 10 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
@@ -18,15 +18,41 b' import os'
18 18 import sys
19 19
20 20 from glob import glob
21
22 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
23 # update it when the contents of directories change.
24 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
25
26 from distutils.core import setup
21 27 from setupext import install_data_ext
22 28
29 # Local imports
30 from IPython.genutils import target_update
31
23 32 # A few handy globals
24 33 isfile = os.path.isfile
25 34 pjoin = os.path.join
26 35
27 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
28 # update it when the contents of directories change.
29 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
36 ##############################################################################
37 # Utility functions
38 def oscmd(s):
39 print ">", s
40 os.system(s)
41
42 # A little utility we'll need below, since glob() does NOT allow you to do
43 # exclusion on multiple endings!
44 def file_doesnt_endwith(test,endings):
45 """Return true if test is a file and its name does NOT end with any
46 of the strings listed in endings."""
47 if not isfile(test):
48 return False
49 for e in endings:
50 if test.endswith(e):
51 return False
52 return True
53
54 ###############################################################################
55 # Main code begins
30 56
31 57 if os.name == 'posix':
32 58 os_name = 'posix'
@@ -36,45 +62,45 b' else:'
36 62 print 'Unsupported operating system:',os.name
37 63 sys.exit(1)
38 64
39 # Under Windows, 'sdist' is not supported, since it requires lyxport (and
40 # hence lyx,perl,latex,pdflatex,latex2html,sh,...)
65 # Under Windows, 'sdist' has not been supported. Now that the docs build with
66 # Sphinx it might work, but let's not turn it on until someone confirms that it
67 # actually works.
41 68 if os_name == 'windows' and 'sdist' in sys.argv:
42 69 print 'The sdist command is not available under Windows. Exiting.'
43 70 sys.exit(1)
44 71
45 from distutils.core import setup
46
47 72 # update the manuals when building a source dist
48 73 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
49 74 import textwrap
50 from IPython.genutils import target_update
51 # list of things to be updated. Each entry is a triplet of args for
75
76 # List of things to be updated. Each entry is a triplet of args for
52 77 # target_update()
53
54 def oscmd(s):
55 print ">", s
56 os.system(s)
57
58 oscmd("cd doc && python do_sphinx.py")
59
60 oscmd("cd doc && gzip -9c ipython.1 > ipython.1.gz")
61 oscmd("cd doc && gzip -9c pycolor.1 > pycolor.1.gz")
78 to_update = [ # The do_sphinx scripts builds html and pdf, so just one
79 # target is enough to cover all manual generation
80 ('doc/manual/ipython.pdf',
81 ['IPython/Release.py','doc/source/ipython.rst'],
82 "cd doc && python do_sphinx.py" ),
83
84 # FIXME - Disabled for now: we need to redo an automatic way
85 # of generating the magic info inside the rst.
86 #('doc/magic.tex',
87 #['IPython/Magic.py'],
88 #"cd doc && ./update_magic.sh" ),
89
90 ('doc/ipython.1.gz',
91 ['doc/ipython.1'],
92 "cd doc && gzip -9c ipython.1 > ipython.1.gz"),
93
94 ('doc/pycolor.1.gz',
95 ['doc/pycolor.1'],
96 "cd doc && gzip -9c pycolor.1 > pycolor.1.gz"),
97 ]
98
99 [ target_update(*t) for t in to_update ]
62 100
63 101 # Release.py contains version, authors, license, url, keywords, etc.
64 102 execfile(pjoin('IPython','Release.py'))
65 103
66 # A little utility we'll need below, since glob() does NOT allow you to do
67 # exclusion on multiple endings!
68 def file_doesnt_endwith(test,endings):
69 """Return true if test is a file and its name does NOT end with any
70 of the strings listed in endings."""
71 if not isfile(test):
72 return False
73 for e in endings:
74 if test.endswith(e):
75 return False
76 return True
77
78 104 # I can't find how to make distutils create a nested dir. structure, so
79 105 # in the meantime do it manually. Butt ugly.
80 106 # Note that http://www.redbrick.dcu.ie/~noel/distutils.html, ex. 2/3, contain
@@ -87,18 +113,15 b" manpagebase = 'share/man/man1'"
87 113 # MANIFEST.in file.
88 114 exclude = ('.sh','.1.gz')
89 115 docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('doc/*'))
90
91 116 examfiles = filter(isfile, glob('doc/examples/*.py'))
92 manfiles = filter(isfile, glob('doc/build/html/*'))
93 manstatic = filter(isfile, glob('doc/build/html/_static/*'))
94
95 # filter(isfile, glob('doc/manual/*.css')) + \
96 # filter(isfile, glob('doc/manual/*.png'))
97
117 manfiles = filter(isfile, glob('doc/manual/*'))
118 manstatic = filter(isfile, glob('doc/manual/_static/*'))
98 119 manpages = filter(isfile, glob('doc/*.1.gz'))
120
99 121 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
100 122 scriptfiles = filter(isfile, ['scripts/ipython','scripts/pycolor',
101 123 'scripts/irunner'])
124
102 125 igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*'))
103 126
104 127 # Script to be run by the windows binary installer after the default setup
@@ -129,19 +152,15 b" if 'setuptools' in sys.modules:"
129 152 ]}
130 153 }
131 154 scriptfiles = []
132 # eggs will lack docs, eaxmples
155 # eggs will lack docs, examples
133 156 datafiles = []
134
135 #datafiles = [('lib', 'IPython/UserConfig', cfgfiles)]
136 157 else:
158 # Normal, non-setuptools install
137 159 egg_extra_kwds = {}
138 160 # package_data of setuptools was introduced to distutils in 2.4
139 161 if sys.version_info < (2,4):
140 162 datafiles.append(('lib', 'IPython/UserConfig', cfgfiles))
141 163
142
143
144
145 164 # Call the setup() routine which does most of the work
146 165 setup(name = name,
147 166 version = version,
@@ -154,7 +173,9 b' setup(name = name,'
154 173 license = license,
155 174 platforms = platforms,
156 175 keywords = keywords,
157 packages = ['IPython', 'IPython.Extensions', 'IPython.external', 'IPython.gui', 'IPython.gui.wx', 'IPython.UserConfig'],
176 packages = ['IPython', 'IPython.Extensions', 'IPython.external',
177 'IPython.gui', 'IPython.gui.wx',
178 'IPython.UserConfig'],
158 179 scripts = scriptfiles,
159 180 package_data = {'IPython.UserConfig' : ['*'] },
160 181
@@ -1,5 +1,8 b''
1 import os,sys,shutil
1 #!/usr/bin/env python
2 """Simple script to create a tarball with proper bzr version info.
3 """
2 4
5 import os,sys,shutil
3 6
4 7 basever = '0.8.3'
5 8
@@ -1,11 +1,10 b''
1 """ Create ipykit and exe installer
1 #!/usr/bin/env python
2 """IPython release script
2 3
3 requires py2exe
4 Create ipykit and exe installer
4 5
6 requires py2exe
5 7 """
6 #!/bin/sh
7 # IPython release script
8
9 8
10 9 import os
11 10 import distutils.dir_util
@@ -19,7 +18,6 b' def c(cmd):'
19 18
20 19 ipykit_name = "ipykit-%s" % version
21 20
22
23 21 os.chdir('..')
24 22 if os.path.isdir('dist'):
25 23 distutils.dir_util.remove_tree('dist')
@@ -4,6 +4,7 b''
4 4 PYVER=`python -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1$2}' `
5 5 version=`ipython -Version`
6 6 ipdir=~/ipython/ipython
7 ipbackupdir=~/ipython/backup
7 8
8 9 echo
9 10 echo "Releasing IPython version $version"
@@ -37,7 +38,8 b' rm -rf $ipdir/dist/*'
37 38
38 39 # Perform local backup
39 40 cd $ipdir/tools
40 ./bkp.sh
41 ./make_tarball.py
42 mv ipython-*.tgz $ipbackupdir
41 43
42 44 # Build source and binary distros
43 45 cd $ipdir
@@ -50,8 +52,8 b' python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/py'
50 52 python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
51 53
52 54 # Build eggs
53 python2.4 ./eggsetup.py bdist_egg
54 python2.5 ./eggsetup.py bdist_egg
55 python2.4 ./setup_bdist_egg.py
56 python2.5 ./setup_bdist_egg.py
55 57
56 58 # Call the windows build separately, so that the extra Windows scripts don't
57 59 # get pulled into Unix builds (setup.py has code which checks for
@@ -72,8 +74,8 b' echo "Uploading distribution files..."'
72 74 scp * ipython@ipython.scipy.org:www/dist/
73 75
74 76 echo "Uploading backup files..."
75 cd ~/ipython/backup
76 scp `ls -1tr | tail -1` ipython@ipython.scipy.org:www/backup/
77 cd $ipbackupdir
78 scp `ls -1tr *tgz | tail -1` ipython@ipython.scipy.org:www/backup/
77 79
78 80 echo "Updating webpage..."
79 81 cd $ipdir/doc
@@ -86,8 +88,8 b' cd $www'
86 88
87 89 # Alert package maintainers
88 90 echo "Alerting package maintainers..."
89 maintainers='fperez@colorado.edu ariciputi@users.sourceforge.net jack@xiph.org tretkowski@inittab.de dryice@hotpop.com willmaier@ml1.net'
90 #maintainers='fperez@colorado.edu'
91 #maintainers='fernando.perez@berkeley.edu ariciputi@users.sourceforge.net jack@xiph.org tretkowski@inittab.de dryice@hotpop.com willmaier@ml1.net'
92 maintainers='fernando.perez@berkeley.edu'
91 93
92 94 for email in $maintainers
93 95 do
@@ -2,13 +2,22 b''
2 2
3 3 # release test
4 4
5 cd ~/ipython/ipython
5 ipdir=~/ipython/ipython
6 ipbackupdir=~/ipython/backup
6 7
7 # clean up build/dist directories
8 rm -rf build/*
9 rm -rf dist/*
8 cd $ipdir
9
10 # Clean up build/dist directories
11 rm -rf $ipdir/build/*
12 rm -rf $ipdir/dist/*
13
14 # Perform local backup
15 cd $ipdir/tools
16 ./make_tarball.py
17 mv ipython-*.tgz $ipbackupdir
10 18
11 19 # build source distros
20 cd $ipdir
12 21 ./setup.py sdist --formats=gztar
13 22
14 23 # Build rpms
@@ -16,8 +25,8 b' python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/py'
16 25 python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
17 26
18 27 # Build eggs
19 python2.4 ./eggsetup.py bdist_egg
20 python2.5 ./eggsetup.py bdist_egg
28 python2.4 ./setup_bdist_egg.py
29 python2.5 ./setup_bdist_egg.py
21 30
22 31 # Call the windows build separately, so that the extra Windows scripts don't
23 32 # get pulled into Unix builds (setup.py has code which checks for
@@ -25,4 +34,4 b' python2.5 ./eggsetup.py bdist_egg'
25 34 ./setup.py bdist_wininst --install-script=ipython_win_post_install.py
26 35
27 36 # Change name so retarded Vista runs the installer correctly
28 rename 's/win32/win32-setup/' dist/*.exe
37 rename 's/win32/win32-setup/' $ipdir/dist/*.exe
@@ -104,8 +104,8 b' def run(wait=0):'
104 104 os.mkdir(ip_prog_dir)
105 105 os.chdir(ip_prog_dir)
106 106
107 man_pdf = doc_dir + r'\manual.pdf'
108 man_htm = doc_dir + r'\manual\manual.html'
107 man_pdf = doc_dir + r'\manual\ipython.pdf'
108 man_htm = doc_dir + r'\manual\ipython.html'
109 109
110 110 make_shortcut('IPython.lnk',sys.executable, '"%s"' % ip_filename,
111 111 my_documents_dir,
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (1049 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now