reverted:
--- ipython-0.7.2/debian/ipython.links
+++ ipython-0.7.2.orig/debian/ipython.links
@@ -1 +0,0 @@
-usr/share/doc/ipython-common	usr/share/doc/ipython
diff -u ipython-0.7.2/debian/changelog ipython-0.7.2/debian/changelog
--- ipython-0.7.2/debian/changelog
+++ ipython-0.7.2/debian/changelog
@@ -1,3 +1,11 @@
+ipython (0.7.2-3.1) unstable; urgency=low
+
+  * NMU
+  * Convert to updated Python policy. Collapse all packages into one
+    ipython package, don't handle ipython using alternatives.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 11 Jul 2006 09:47:37 +0000
+
 ipython (0.7.2-3) unstable; urgency=low
 
   * Removed alternative for irunner manpage.
diff -u ipython-0.7.2/debian/control ipython-0.7.2/debian/control
--- ipython-0.7.2/debian/control
+++ ipython-0.7.2/debian/control
@@ -3,14 +3,19 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
 Uploaders: Norbert Tretkowski <nobse@debian.org>
-Build-Depends-Indep: debhelper (>> 4.1.65), dpatch (>= 2.0.10), python, python2.3-dev, python2.4-dev
+Build-Depends-Indep: debhelper (>= 5.0.37.2), dpatch (>= 2.0.10), python-all-dev (>= 2.3.5-11), python-central (>= 0.5)
+XS-Python-Version: all
 Standards-Version: 3.7.2.0
 
 Package: ipython
 Architecture: all
-Depends: python2.3-ipython (= ${Source-Version}), ipython-common
+Depends: ${python:Depends}
+Recommends: python-numeric, python-numeric-ext, python-pexpect
+Conflicts: python2.3-ipython, python2.4-ipython, ipython-common
+Replaces: python2.3-ipython, python2.4-ipython, ipython-common
+XB-Python-Version: all
 Suggests: python-profiler
-Description: enhanced interactive Python shell [dummy package]
+Description: enhanced interactive Python shell
  IPython is an enhanced interactive Python shell. It can be used as a
  replacement for the standard Python shell, or it can be used as a
  complete working environment for scientific computing (like Matlab or
@@ -23,65 +28,2 @@
  .
- This package is an empty dummy package that always depends on a package
- built for Debian's default Python version.
- .
- Homepage: http://ipython.scipy.org/ 
-
-Package: ipython-common
-Architecture: all
-Replaces: ipython (<= 0.6.12-1)
-Description: enhanced interactive Python shell [common files]
- IPython is an enhanced interactive Python shell. It can be used as a
- replacement for the standard Python shell, or it can be used as a
- complete working environment for scientific computing (like Matlab or
- Mathematica) when paired with the standard Python scientific and
- numerical tools. It supports dynamic object introspections, numbered
- input/output prompts, a macro system, session logging, session
- restoring, complete system shell access, verbose and colored traceback
- reports, auto-parentheses, auto-quoting, and is embeddedable in other
- Python programs.
- .
- This package provides files shared by ipython across different python
- versions.
- .
- Homepage: http://ipython.scipy.org/ 
-
-Package: python2.3-ipython
-Architecture: all
-Depends: ${python:Depends}, ipython-common
-Replaces: ipython (<= 0.6.12-1)
-Recommends: python2.3-numeric, python2.3-numeric-ext, python2.3-pexpect
-Suggests: python2.3-profiler
-Description: enhanced interactive Python shell [built for python 2.3]
- IPython is an enhanced interactive Python shell. It can be used as a
- replacement for the standard Python shell, or it can be used as a
- complete working environment for scientific computing (like Matlab or
- Mathematica) when paired with the standard Python scientific and
- numerical tools. It supports dynamic object introspections, numbered
- input/output prompts, a macro system, session logging, session
- restoring, complete system shell access, verbose and colored traceback
- reports, auto-parentheses, auto-quoting, and is embeddedable in other
- Python programs.
- .
- This package is built with Python 2.3.
- .
- Homepage: http://ipython.scipy.org/ 
-
-Package: python2.4-ipython
-Architecture: all
-Depends: ${python:Depends}, ipython-common
-Recommends: python2.4-numeric, python2.4-numeric-ext, python2.4-pexpect
-Suggests: python2.4-profiler
-Description: enhanced interactive Python shell [built for python 2.4]
- IPython is an enhanced interactive Python shell. It can be used as a
- replacement for the standard Python shell, or it can be used as a
- complete working environment for scientific computing (like Matlab or
- Mathematica) when paired with the standard Python scientific and
- numerical tools. It supports dynamic object introspections, numbered
- input/output prompts, a macro system, session logging, session
- restoring, complete system shell access, verbose and colored traceback
- reports, auto-parentheses, auto-quoting, and is embeddedable in other
- Python programs.
- .
- This package is built with Python 2.4.
- .
  Homepage: http://ipython.scipy.org/ 
reverted:
--- ipython-0.7.2/debian/python2.3-ipython.postinst
+++ ipython-0.7.2.orig/debian/python2.3-ipython.postinst
@@ -1,12 +0,0 @@
-#! /bin/sh -e
-if [ "$1" = "configure" ]; then
-	for i in ipython pycolor ; do
-    	update-alternatives \
-			--install /usr/bin/$i $i /usr/bin/python2.3-$i 30 \
-			--slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/python2.3-$i.1.gz
-	done
-	update-alternatives --remove irunner /usr/bin/python2.3-irunner
-	update-alternatives --install /usr/bin/irunner irunner /usr/bin/python2.3-irunner 30
-fi
-
-#DEBHELPER#
reverted:
--- ipython-0.7.2/debian/ipython-common.doc-base
+++ ipython-0.7.2.orig/debian/ipython-common.doc-base
@@ -1,12 +0,0 @@
-Document: ipython
-Title: IPython Manual
-Author: Fernando Perez <fperez@colorado.edu>
-Abstract: Full documentation on all features of IPython.
-Section: devel
-
-Format: pdf
-Files: /usr/share/doc/ipython-common/*.pdf.gz
-
-Format: HTML
-Index: /usr/share/doc/ipython-common/manual/index.html
-Files: /usr/share/doc/ipython-common/manual/*.html
reverted:
--- ipython-0.7.2/debian/python2.3-ipython.links
+++ ipython-0.7.2.orig/debian/python2.3-ipython.links
@@ -1 +0,0 @@
-usr/share/doc/ipython-common	usr/share/doc/python2.3-ipython
reverted:
--- ipython-0.7.2/debian/python2.4-ipython.postinst
+++ ipython-0.7.2.orig/debian/python2.4-ipython.postinst
@@ -1,12 +0,0 @@
-#! /bin/sh -e
-if [ "$1" = "configure" ]; then
-	for i in ipython pycolor ; do
-    	update-alternatives \
-			--install /usr/bin/$i $i /usr/bin/python2.4-$i 30 \
-			--slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/python2.4-$i.1.gz
-	done
-	update-alternatives --remove irunner /usr/bin/python2.4-irunner
-	update-alternatives --install /usr/bin/irunner irunner /usr/bin/python2.4-irunner 30
-fi
-
-#DEBHELPER#
reverted:
--- ipython-0.7.2/debian/python2.3-ipython.prerm
+++ ipython-0.7.2.orig/debian/python2.3-ipython.prerm
@@ -1,8 +0,0 @@
-#! /bin/sh -e
-if [ "$1" = "remove" ]; then
-	for i in irunner ipython pycolor ; do
-		update-alternatives --remove $i /usr/bin/python2.3-$i
-	done
-fi
-
-#DEBHELPER#
reverted:
--- ipython-0.7.2/debian/python2.4-ipython.links
+++ ipython-0.7.2.orig/debian/python2.4-ipython.links
@@ -1 +0,0 @@
-usr/share/doc/ipython-common	usr/share/doc/python2.4-ipython
diff -u ipython-0.7.2/debian/rules ipython-0.7.2/debian/rules
--- ipython-0.7.2/debian/rules
+++ ipython-0.7.2/debian/rules
@@ -7,12 +7,17 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+PYDEF := $(shell pyversions -vd)
+PYVERS := $(filter-out $(PYDEF), $(shell pyversions -vr debian/control)) $(PYDEF)
+
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
 
-	python2.3 setup.py config
-	python2.4 setup.py config
+	set -e; \
+	for v in $(PYVERS); do \
+	  python$$(echo $$v | sed "s/$(PYDEF)//") setup.py config; \
+	done
 
 	touch configure-stamp
 
@@ -22,8 +27,10 @@
 build-stamp:
 	dh_testdir
 
-	python2.3 setup.py build
-	python2.4 setup.py build
+	set -e; \
+	for v in $(PYVERS); do \
+	  python$$(echo $$v | sed "s/$(PYDEF)//") setup.py build; \
+	done
 
 	touch build-stamp
 
@@ -34,8 +41,11 @@
 	dh_testroot
 	rm -f build-stamp configure-stamp
 
-	python2.3 setup.py clean --all
-	python2.4 setup.py clean --all
+	set -e; \
+	for v in $(PYVERS); do \
+	  python$$v setup.py clean --all; \
+	done
+	rm -rf build
 	rm -f setupext/*.pyc
 
 	dh_clean
@@ -56,23 +66,22 @@
 	dh_clean -k
 	dh_installdirs
 
-	python2.3 setup.py install --prefix $(CURDIR)/debian/python2.3-ipython/usr
-	python2.4 setup.py install --prefix $(CURDIR)/debian/python2.4-ipython/usr
+	set -e; \
+	for v in $(PYVERS); do \
+	  python$$(echo $$v | sed "s/$(PYDEF)//") setup.py install --prefix $(CURDIR)/debian/ipython/usr; \
+	done
 
 	# remove documentation
-	mkdir -p $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common
-	mv $(CURDIR)/debian/python2.3-ipython/usr/share/doc/ipython/* $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common
-	rm $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/COPYING
-	rm $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/ChangeLog
-	rm $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/ipython.el
-	rm $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/README_Windows.txt
-	rm $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/pycon.ico
-	rm -r $(CURDIR)/debian/python2.3-ipython/usr/share/doc/ipython
-	rm -r $(CURDIR)/debian/python2.4-ipython/usr/share/doc/ipython
+	rm $(CURDIR)/debian/ipython/usr/share/doc/ipython/COPYING
+	rm $(CURDIR)/debian/ipython/usr/share/doc/ipython/ChangeLog
+	rm $(CURDIR)/debian/ipython/usr/share/doc/ipython/ipython.el
+	rm $(CURDIR)/debian/ipython/usr/share/doc/ipython/README_Windows.txt
+	rm $(CURDIR)/debian/ipython/usr/share/doc/ipython/pycon.ico
 
 	# change permission on scripts
-	chmod a-x $(CURDIR)/debian/ipython-common/usr/share/doc/ipython-common/examples/*
+	chmod a-x $(CURDIR)/debian/ipython/usr/share/doc/ipython/examples/*
 
+ifeq (0,1)
 	# rename binaries
 	mv $(CURDIR)/debian/python2.3-ipython/usr/bin/ipython $(CURDIR)/debian/python2.3-ipython/usr/bin/python2.3-ipython
 	mv $(CURDIR)/debian/python2.3-ipython/usr/bin/irunner $(CURDIR)/debian/python2.3-ipython/usr/bin/python2.3-irunner
@@ -86,13 +95,14 @@
 	mv $(CURDIR)/debian/python2.3-ipython/usr/share/man/man1/pycolor.1.gz $(CURDIR)/debian/python2.3-ipython/usr/share/man/man1/python2.3-pycolor.1.gz
 	mv $(CURDIR)/debian/python2.4-ipython/usr/share/man/man1/ipython.1.gz $(CURDIR)/debian/python2.4-ipython/usr/share/man/man1/python2.4-ipython.1.gz
 	mv $(CURDIR)/debian/python2.4-ipython/usr/share/man/man1/pycolor.1.gz $(CURDIR)/debian/python2.4-ipython/usr/share/man/man1/python2.4-pycolor.1.gz
+endif
 
 binary-indep: build install
 	dh_testdir
 	dh_testroot
 	dh_link
-	dh_installchangelogs doc/ChangeLog -Npython2.3-ipython -Npython2.4-ipython -Nipython
-	dh_installdocs -Npython2.3-ipython -Npython2.4-ipython -Nipython
+	dh_installchangelogs doc/ChangeLog
+	dh_installdocs
 #	dh_installexamples
 	dh_install
 #	dh_installmenu
@@ -107,6 +117,7 @@
 #	dh_installman doc/ipython.1.gz doc/pycolor.1.gz
 	dh_compress -Xexamples
 	dh_fixperms
+	dh_pycentral
 	dh_python
 #	dh_makeshlibs
 	dh_installdeb
reverted:
--- ipython-0.7.2/debian/python2.4-ipython.prerm
+++ ipython-0.7.2.orig/debian/python2.4-ipython.prerm
@@ -1,8 +0,0 @@
-#! /bin/sh -e
-if [ "$1" = "remove" ]; then
-	for i in irunner ipython pycolor ; do
-		update-alternatives --remove $i /usr/bin/python2.4-$i
-	done
-fi
-
-#DEBHELPER#
only in patch2:
unchanged:
--- ipython-0.7.2.orig/debian/ipython.preinst
+++ ipython-0.7.2/debian/ipython.preinst
@@ -0,0 +1,10 @@
+#! /bin/sh -e
+
+# remove old alternatives
+for v in 2.3 2.4; do
+	for i in irunner ipython pycolor ; do
+		update-alternatives --quiet --remove $i /usr/bin/python$v-$i
+	done
+done
+
+#DEBHELPER#
only in patch2:
unchanged:
--- ipython-0.7.2.orig/debian/ipython.doc-base
+++ ipython-0.7.2/debian/ipython.doc-base
@@ -0,0 +1,12 @@
+Document: ipython
+Title: IPython Manual
+Author: Fernando Perez <fperez@colorado.edu>
+Abstract: Full documentation on all features of IPython.
+Section: devel
+
+Format: pdf
+Files: /usr/share/doc/ipython/*.pdf.gz
+
+Format: HTML
+Index: /usr/share/doc/ipython/manual/index.html
+Files: /usr/share/doc/ipython/manual/*.html
