From 86a76129b78cbacf0eccdabd7505bc05fc44aa9e 2008-05-28 22:48:09 From: Fernando Perez Date: 2008-05-28 22:48:09 Subject: [PATCH] Fixes to build/doc scripts. --- diff --git a/IPython/Release.py b/IPython/Release.py index c36d249..aa1a959 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -22,7 +22,7 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '117' +revision = '83' branch = 'ipython' if branch == 'ipython': diff --git a/MANIFEST.in b/MANIFEST.in index d3bd989..b585984 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -22,9 +22,8 @@ exclude doc/manual/*.log exclude doc/manual/*.out exclude doc/manual/*.pl exclude doc/manual/*.tex -exclude doc/build/doctrees/* -exclude doc/build/latex/* -exclude doc/build/html/_sources/* +exclude doc/build +exclude doc/attic @@ -34,3 +33,4 @@ global-exclude *.flc global-exclude *.pyc global-exclude .dircopy.log global-exclude .svn +global-exclude .bzr diff --git a/doc/ipnb_google_soc.lyx b/doc/attic/ipnb_google_soc.lyx similarity index 100% rename from doc/ipnb_google_soc.lyx rename to doc/attic/ipnb_google_soc.lyx diff --git a/doc/nbexample.py b/doc/attic/nbexample.py similarity index 100% rename from doc/nbexample.py rename to doc/attic/nbexample.py diff --git a/doc/nbexample_latex.py b/doc/attic/nbexample_latex.py similarity index 100% rename from doc/nbexample_latex.py rename to doc/attic/nbexample_latex.py diff --git a/doc/nbexample_output.py b/doc/attic/nbexample_output.py similarity index 100% rename from doc/nbexample_output.py rename to doc/attic/nbexample_output.py diff --git a/doc/new_design.lyx b/doc/attic/new_design.lyx similarity index 100% rename from doc/new_design.lyx rename to doc/attic/new_design.lyx diff --git a/doc/do_sphinx.py b/doc/do_sphinx.py old mode 100644 new mode 100755 index 296061e..ead5a58 --- a/doc/do_sphinx.py +++ b/doc/do_sphinx.py @@ -1,3 +1,7 @@ +#!/usr/bin/env python +"""Script to build documentation using Sphinx. +""" + import fileinput,os,sys def oscmd(c): @@ -11,6 +15,7 @@ if sys.platform != 'win32': oscmd('sphinx-build -b latex -d build/doctrees source build/latex') # Produce pdf. + topdir = os.getcwd() os.chdir('build/latex') # Change chapter style to section style: allows chapters to start on @@ -60,5 +65,10 @@ if sys.platform != 'win32': oscmd('makeindex -s python.ist modipython.idx') oscmd('pdflatex ipython.tex') oscmd('pdflatex ipython.tex') - oscmd('cp ipython.pdf ../html') - os.chdir('../..') + + # Create a manual/ directory with final html/pdf output + os.chdir(topdir) + oscmd('rm -rf manual') + oscmd('mkdir manual') + oscmd('cp -r build/html/*.html build/html/_static manual/') + oscmd('cp build/latex/ipython.pdf manual/') diff --git a/tools/make_tarball.py b/tools/make_tarball.py index 84491b9..4dd7427 100755 --- a/tools/make_tarball.py +++ b/tools/make_tarball.py @@ -1,5 +1,8 @@ -import os,sys,shutil +#!/usr/bin/env python +"""Simple script to create a tarball with proper bzr version info. +""" +import os,sys,shutil basever = '0.8.3' diff --git a/tools/mkrel.py b/tools/mkrel.py index b4206d2..01c8a8a 100755 --- a/tools/mkrel.py +++ b/tools/mkrel.py @@ -1,11 +1,10 @@ -""" Create ipykit and exe installer +#!/usr/bin/env python +"""IPython release script -requires py2exe +Create ipykit and exe installer +requires py2exe """ -#!/bin/sh -# IPython release script - import os import distutils.dir_util @@ -19,7 +18,6 @@ def c(cmd): ipykit_name = "ipykit-%s" % version - os.chdir('..') if os.path.isdir('dist'): distutils.dir_util.remove_tree('dist') diff --git a/tools/release b/tools/release index 24c43b1..fb34b73 100755 --- a/tools/release +++ b/tools/release @@ -4,6 +4,7 @@ PYVER=`python -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1$2}' ` version=`ipython -Version` ipdir=~/ipython/ipython +ipbackupdir=~/ipython/backup echo echo "Releasing IPython version $version" @@ -37,7 +38,8 @@ rm -rf $ipdir/dist/* # Perform local backup cd $ipdir/tools -./bkp.sh +./make_tarball.py +mv ipython-*.tgz $ipbackupdir # Build source and binary distros cd $ipdir @@ -50,8 +52,8 @@ python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/py python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5 # Build eggs -python2.4 ./eggsetup.py bdist_egg -python2.5 ./eggsetup.py bdist_egg +python2.4 ./setup_bdist_egg.py +python2.5 ./setup_bdist_egg.py # Call the windows build separately, so that the extra Windows scripts don't # get pulled into Unix builds (setup.py has code which checks for @@ -72,7 +74,7 @@ echo "Uploading distribution files..." scp * ipython@ipython.scipy.org:www/dist/ echo "Uploading backup files..." -cd ~/ipython/backup +cd $ipbackupdir scp `ls -1tr | tail -1` ipython@ipython.scipy.org:www/backup/ echo "Updating webpage..." @@ -86,8 +88,8 @@ cd $www # Alert package maintainers echo "Alerting package maintainers..." -maintainers='fperez@colorado.edu ariciputi@users.sourceforge.net jack@xiph.org tretkowski@inittab.de dryice@hotpop.com willmaier@ml1.net' -#maintainers='fperez@colorado.edu' +#maintainers='fernando.perez@berkeley.edu ariciputi@users.sourceforge.net jack@xiph.org tretkowski@inittab.de dryice@hotpop.com willmaier@ml1.net' +maintainers='fernando.perez@berkeley.edu' for email in $maintainers do diff --git a/tools/testrel b/tools/testrel index 726ccd7..4d08d8f 100755 --- a/tools/testrel +++ b/tools/testrel @@ -16,8 +16,8 @@ python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/py python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5 # Build eggs -python2.4 ./eggsetup.py bdist_egg -python2.5 ./eggsetup.py bdist_egg +python2.4 ./setup_bdist_egg.py +python2.5 ./setup_bdist_egg.py # Call the windows build separately, so that the extra Windows scripts don't # get pulled into Unix builds (setup.py has code which checks for