##// END OF EJS Templates
Fixes to build/doc scripts.
Fernando Perez -
Show More
@@ -1,89 +1,89 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Release data for the IPython project.
3 3
4 4 $Id: Release.py 3002 2008-02-01 07:17:00Z fperez $"""
5 5
6 6 #*****************************************************************************
7 7 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
8 8 #
9 9 # Copyright (c) 2001 Janko Hauser <jhauser@zscout.de> and Nathaniel Gray
10 10 # <n8gray@caltech.edu>
11 11 #
12 12 # Distributed under the terms of the BSD License. The full license is in
13 13 # the file COPYING, distributed as part of this software.
14 14 #*****************************************************************************
15 15
16 16 # Name of the package for release purposes. This is the name which labels
17 17 # the tarballs and RPMs made by distutils, so it's best to lowercase it.
18 18 name = 'ipython'
19 19
20 20 # For versions with substrings (like 0.6.16.svn), use an extra . to separate
21 21 # the new substring. We have to avoid using either dashes or underscores,
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 = '83'
26 26 branch = 'ipython'
27 27
28 28 if branch == 'ipython':
29 29 version = '0.8.3.bzr.r' + revision
30 30 else:
31 31 version = '0.8.3.bzr.r%s.%s' % (revision,branch)
32 32
33 33 version = '0.8.3'
34 34
35 35 description = "An enhanced interactive Python shell."
36 36
37 37 long_description = \
38 38 """
39 39 IPython provides a replacement for the interactive Python interpreter with
40 40 extra functionality.
41 41
42 42 Main features:
43 43
44 44 * Comprehensive object introspection.
45 45
46 46 * Input history, persistent across sessions.
47 47
48 48 * Caching of output results during a session with automatically generated
49 49 references.
50 50
51 51 * Readline based name completion.
52 52
53 53 * Extensible system of 'magic' commands for controlling the environment and
54 54 performing many tasks related either to IPython or the operating system.
55 55
56 56 * Configuration system with easy switching between different setups (simpler
57 57 than changing $PYTHONSTARTUP environment variables every time).
58 58
59 59 * Session logging and reloading.
60 60
61 61 * Extensible syntax processing for special purpose situations.
62 62
63 63 * Access to the system shell with user-extensible alias system.
64 64
65 65 * Easily embeddable in other Python programs.
66 66
67 67 * Integrated access to the pdb debugger and the Python profiler.
68 68
69 69 The latest development version is always available at the IPython subversion
70 70 repository_.
71 71
72 72 .. _repository: http://ipython.scipy.org/svn/ipython/ipython/trunk#egg=ipython-dev
73 73 """
74 74
75 75 license = 'BSD'
76 76
77 77 authors = {'Fernando' : ('Fernando Perez','fperez@colorado.edu'),
78 78 'Janko' : ('Janko Hauser','jhauser@zscout.de'),
79 79 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'),
80 80 'Ville' : ('Ville Vainio','vivainio@gmail.com')
81 81 }
82 82
83 83 url = 'http://ipython.scipy.org'
84 84
85 85 download_url = 'http://ipython.scipy.org/dist'
86 86
87 87 platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME']
88 88
89 89 keywords = ['Interactive','Interpreter','Shell']
@@ -1,36 +1,36 b''
1 1 include README_Windows.txt
2 2 include win32_manual_post_install.py
3 3 include ipython.py
4 4
5 5 graft scripts
6 6
7 7 graft setupext
8 8
9 9 graft IPython/UserConfig
10 10
11 11 graft doc
12 12 exclude doc/*.1
13 13 exclude doc/manual_base*
14 14 exclude doc/ChangeLog.*
15 15 exclude doc/\#*
16 16 exclude doc/update_magic.sh
17 17 exclude doc/update_version.sh
18 18 exclude doc/manual_base*
19 19 exclude doc/manual/WARNINGS
20 20 exclude doc/manual/*.aux
21 21 exclude doc/manual/*.log
22 22 exclude doc/manual/*.out
23 23 exclude doc/manual/*.pl
24 24 exclude doc/manual/*.tex
25 exclude doc/build/doctrees/*
26 exclude doc/build/latex/*
27 exclude doc/build/html/_sources/*
25 exclude doc/build
26 exclude doc/attic
28 27
29 28
30 29
31 30
32 31 global-exclude *~
33 32 global-exclude *.flc
34 33 global-exclude *.pyc
35 34 global-exclude .dircopy.log
36 35 global-exclude .svn
36 global-exclude .bzr
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,64 +1,74 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):
4 8 os.system(c)
5 9
6 10 # html manual.
7 11 oscmd('sphinx-build -d build/doctrees source build/html')
8 12
9 13 if sys.platform != 'win32':
10 14 # LaTeX format.
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
17 22 # the current page. Works much better for the short chapters we have.
18 23 # This must go in the class file rather than the preamble, so we modify
19 24 # manual.cls at runtime.
20 25 chapter_cmds=r'''
21 26 % Local changes.
22 27 \renewcommand\chapter{
23 28 \thispagestyle{plain}
24 29 \global\@topnum\z@
25 30 \@afterindentfalse
26 31 \secdef\@chapter\@schapter
27 32 }
28 33 \def\@makechapterhead#1{
29 34 \vspace*{10\p@}
30 35 {\raggedright \reset@font \Huge \bfseries \thechapter \quad #1}
31 36 \par\nobreak
32 37 \hrulefill
33 38 \par\nobreak
34 39 \vspace*{10\p@}
35 40 }
36 41 \def\@makeschapterhead#1{
37 42 \vspace*{10\p@}
38 43 {\raggedright \reset@font \Huge \bfseries #1}
39 44 \par\nobreak
40 45 \hrulefill
41 46 \par\nobreak
42 47 \vspace*{10\p@}
43 48 }
44 49 '''
45 50
46 51 unmodified=True
47 52 for line in fileinput.FileInput('manual.cls',inplace=1):
48 53 if 'Support for module synopsis' in line and unmodified:
49 54 line=chapter_cmds+line
50 55 elif 'makechapterhead' in line:
51 56 # Already have altered manual.cls: don't need to again.
52 57 unmodified=False
53 58 print line,
54 59
55 60 # Copying the makefile produced by sphinx...
56 61 oscmd('pdflatex ipython.tex')
57 62 oscmd('pdflatex ipython.tex')
58 63 oscmd('pdflatex ipython.tex')
59 64 oscmd('makeindex -s python.ist ipython.idx')
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/')
@@ -1,33 +1,36 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
6 9 def oscmd(c):
7 10 print ">",c
8 11 s = os.system(c)
9 12 if s:
10 13 print "Error",s
11 14 sys.exit(s)
12 15
13 16 def verinfo():
14 17
15 18 out = os.popen('bzr version-info')
16 19 pairs = (l.split(':',1) for l in out)
17 20 d = dict(((k,v.strip()) for (k,v) in pairs))
18 21 return d
19 22
20 23 basename = 'ipython'
21 24
22 25 #tarname = '%s.r%s.tgz' % (basename, ver)
23 26 oscmd('python update_revnum.py')
24 27
25 28 ver = verinfo()
26 29
27 30 if ver['branch-nick'] == 'ipython':
28 31 tarname = 'ipython-%s.bzr.r%s.tgz' % (basever, ver['revno'])
29 32 else:
30 33 tarname = 'ipython-%s.bzr.r%s.%s.tgz' % (basever, ver['revno'], ver['branch-nick'])
31 34
32 35 oscmd('bzr export ' + tarname)
33 36
@@ -1,50 +1,48 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
12 11 import sys
13 12
14 13 execfile('../IPython/Release.py')
15 14
16 15 def c(cmd):
17 16 print ">",cmd
18 17 os.system(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')
26 24 if os.path.isdir(ipykit_name):
27 25 distutils.dir_util.remove_tree(ipykit_name)
28 26
29 27 if sys.platform == 'win32':
30 28 c("python exesetup.py py2exe")
31 29
32 30 os.rename('dist',ipykit_name)
33 31
34 32 c("zip -r %s.zip %s" % (ipykit_name, ipykit_name))
35 33
36 34 # Build source and binary distros
37 35 c('./setup.py sdist --formats=gztar')
38 36
39 37 c("python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4")
40 38 c("python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5")
41 39
42 40 # Build eggs
43 41 c('python2.4 ./eggsetup.py bdist_egg')
44 42 c('python2.5 ./eggsetup.py bdist_egg')
45 43
46 44 c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py")
47 45
48 46 os.chdir('tools')
49 47 c('python make_tarball.py')
50 48
@@ -1,99 +1,101 b''
1 1 #!/bin/sh
2 2 # IPython release script
3 3
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"
10 11 echo "=================================="
11 12
12 13 echo "Marking ChangeLog with release information and making NEWS file..."
13 14
14 15 # Stamp changelog and save a copy of the status at each version, in case later
15 16 # we want the NEWS file to start from a point before the very last release (if
16 17 # very small interim releases have no significant changes).
17 18
18 19 cd $ipdir/doc
19 20 cp ChangeLog ChangeLog.old
20 21 cp ChangeLog ChangeLog.$version
21 22 daystamp=`date +%Y-%m-%d`
22 23 echo $daystamp " ***" Released version $version > ChangeLog
23 24 echo >> ChangeLog
24 25 cat ChangeLog.old >> ChangeLog
25 26 rm ChangeLog.old
26 27
27 28 # Build NEWS file
28 29 echo "Changes between the last two releases (major or minor)" > NEWS
29 30 echo "Note that this is an auto-generated diff of the ChangeLogs" >> NEWS
30 31 echo >> NEWS
31 32 diff ChangeLog.previous ChangeLog | grep -v '^0a' | sed 's/^> //g' >> NEWS
32 33 cp ChangeLog ChangeLog.previous
33 34
34 35 # Clean up build/dist directories
35 36 rm -rf $ipdir/build/*
36 37 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
44 46 ./setup.py sdist --formats=gztar
45 47
46 48 # Build version-specific RPMs, where we must use the --python option to ensure
47 49 # that the resulting RPM is really built with the requested python version (so
48 50 # things go to lib/python2.X/...)
49 51 python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
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
58 60 # bdist_wininst)
59 61 ./setup.py bdist_wininst --install-script=ipython_win_post_install.py
60 62
61 63 # Change name so retarded Vista runs the installer correctly
62 64 rename 's/win32/win32-setup/' $ipdir/dist/*.exe
63 65
64 66 # Register with the Python Package Index (PyPI)
65 67 echo "Registering with PyPI..."
66 68 cd $ipdir
67 69 ./setup.py register
68 70
69 71 # Upload all files
70 72 cd $ipdir/dist
71 73 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
77 cd $ipbackupdir
76 78 scp `ls -1tr | tail -1` ipython@ipython.scipy.org:www/backup/
77 79
78 80 echo "Updating webpage..."
79 81 cd $ipdir/doc
80 82 www=~/ipython/homepage
81 83 cp ChangeLog NEWS $www
82 84 rm -rf $www/doc/*
83 85 cp -r manual.pdf manual/ $www/doc
84 86 cd $www
85 87 ./update
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
94 96 echo "Emailing $email..."
95 97 mail -s "[Package maintainer notice] A new IPython is out. Version: $version" \
96 98 $email < NEWS
97 99 done
98 100
99 101 echo "Done!"
@@ -1,28 +1,28 b''
1 1 #!/bin/sh
2 2
3 3 # release test
4 4
5 5 cd ~/ipython/ipython
6 6
7 7 # clean up build/dist directories
8 8 rm -rf build/*
9 9 rm -rf dist/*
10 10
11 11 # build source distros
12 12 ./setup.py sdist --formats=gztar
13 13
14 14 # Build rpms
15 15 python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
16 16 python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
17 17
18 18 # Build eggs
19 python2.4 ./eggsetup.py bdist_egg
20 python2.5 ./eggsetup.py bdist_egg
19 python2.4 ./setup_bdist_egg.py
20 python2.5 ./setup_bdist_egg.py
21 21
22 22 # Call the windows build separately, so that the extra Windows scripts don't
23 23 # get pulled into Unix builds (setup.py has code which checks for
24 24 # bdist_wininst)
25 25 ./setup.py bdist_wininst --install-script=ipython_win_post_install.py
26 26
27 27 # Change name so retarded Vista runs the installer correctly
28 28 rename 's/win32/win32-setup/' dist/*.exe
General Comments 0
You need to be logged in to leave comments. Login now