--- codespeak-lib-0.9.0.orig/py/apigen/htmlgen.py
+++ codespeak-lib-0.9.0/py/apigen/htmlgen.py
@@ -178,6 +178,8 @@
         rev = None
         if wc.check(versioned=True):
             rev = py.path.svnwc(packageroot).info().rev
+        else:
+            rev = py.__package__.revision
         _revcache[packageroot] = rev
     if packageroot.basename == "py": 
         assert rev is not None
--- codespeak-lib-0.9.0.orig/py/apigen/tracer/docstorage.py
+++ codespeak-lib-0.9.0/py/apigen/tracer/docstorage.py
@@ -21,8 +21,17 @@
     for key, value in defs.iteritems():
         chain = key.split('.')
         base = module
-        for elem in chain:
-            base = getattr(base, elem)
+        try:
+            for elem in chain:
+                base = getattr(base, elem)
+        except RuntimeError, exc:
+            if elem == "greenlet":
+                print exc.__class__.__name__, exc
+                print "Greenlets not supported on this platform. Skipping apigen doc for this module"
+                continue
+            else:
+                raise
+            
         if value[1] == '*':
             d.update(get_star_import_tree(base, key))
         else:
--- codespeak-lib-0.9.0.orig/debian/changelog
+++ codespeak-lib-0.9.0/debian/changelog
@@ -0,0 +1,84 @@
+codespeak-lib (0.9.0-4) unstable; urgency=low
+
+  * rebuild to get py2.5 support (closes: #432028)
+  * install webdata html and js files (closes: #434226)
+  * add build dependency on ssh (closes: #419969)
+
+ -- Alexandre Fayolle <afayolle@debian.org>  Thu, 30 Aug 2007 15:33:09 +0200
+
+codespeak-lib (0.9.0-3) unstable; urgency=low
+
+  * Added missing build dependencies on subversion and ssh
+  * Patched code depending on the presence of .svn directories in apigen
+
+ -- Alexandre Fayolle <afayolle@debian.org>  Wed, 21 Feb 2007 10:04:13 +0100
+
+codespeak-lib (0.9.0-2) unstable; urgency=low
+
+  * Added patch to allow the apigen documentation to build even if the
+    platform does not support greenlets
+
+ -- Alexandre Fayolle <afayolle@debian.org>  Tue, 20 Feb 2007 14:21:08 +0100
+
+codespeak-lib (0.9.0-1) unstable; urgency=low
+
+  * Added myself to the list of uploaders, with Guilherme's assent
+  * New upstream release (closes: #411058)
+  * Fixed greenlet build (closes: #355143)
+  * removed deprecated script rst2pdf (closes: #399839), use py.rest instead.
+  * Updated build dependencies and binary dependencies
+  * Wrote an stdlib distutils based setup.py to install the modules
+  * Build HTML documentation
+  * Added man pages for py.rest, py.test, py.cleanup, py.lookup and py.countloc
+  * Acknowledge Matthias Klose's NMU (closes: #361203)
+
+ -- Alexandre Fayolle <afayolle@debian.org>  Thu, 15 Feb 2007 09:54:51 +0100
+
+codespeak-lib (0.7-svn20060621-1) unstable; urgency=low
+
+  * New upstream version.
+  * Split the patches inside debian/patches/ and use dpatch.
+
+ -- Guilherme Salgado <salgado@async.com.br>  Tue, 18 Jul 2006 8:44:23 -0300
+
+codespeak-lib (0.7-svn20050721-5) unstable; urgency=low
+
+  * Convert to updated python policy. Closes: #373304.
+  * Add the upstream name 'pylib' in the short package description.
+    Closes: #361203.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 17 Jun 2006 13:43:51 +0200
+
+codespeak-lib (0.7-svn20050721-4) unstable; urgency=low
+
+  * Fix debian/rules to not add #!python2.4 on the files for the 2.3 package. 
+    (Closes: #345383)
+  * Add a -X.py to dh_compress to make sure .py files are not gziped.
+    (Closes: #361201)
+
+ -- Guilherme Salgado <salgado@async.com.br>  Mon, 17 Apr 2006 16:04:23 -0300
+
+codespeak-lib (0.7-svn20050721-3) unstable; urgency=low
+
+  * Make sure greenlet.so is installed in the right path. (Closes: #345727)
+
+ -- Guilherme Salgado <salgado@async.com.br>  Sun, 22 Jan 2006 17:04:23 -0200
+
+codespeak-lib (0.7-svn20050721-2) unstable; urgency=low
+
+  * Fixed some installation problems and removed windows-specific scripts.
+
+ -- Guilherme Salgado <salgado@async.com.br>  Mon, 12 Dec 2005 16:41:23 -0200
+
+codespeak-lib (0.7.20050829-0ubuntu1) breezy; urgency=low
+
+  * Clean up the packaging.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 29 Aug 2005 16:36:09 +0200
+
+codespeak-lib (0.7-svn20050721) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Guilherme Salgado <salgado@async.com.br>  Sat, 23 Jul 2005 10:48:20 -0300
+
--- codespeak-lib-0.9.0.orig/debian/README.Debian
+++ codespeak-lib-0.9.0/debian/README.Debian
@@ -0,0 +1,19 @@
+pylib for Debian
+----------------
+
+Dependencies
+============
+
+To use some functionnalities, you will need to install some Recommended packages:
+ * py.test --tkinter: python-tkinter
+ * py.test remote session support: screen, rsync
+ * py.rest pdf support: graphviz, tetex-bin, gs-esp or gs-gpl, ps2eps
+
+
+Greenlet support
+================
+
+The greenlet module is not available for all platforms. The
+development team welcomes patches improving the situation.
+
+ -- Alexandre Fayolle <afayolle@debian.org>, Thu, 11 Jan 2007 16:40:45 +0100
--- codespeak-lib-0.9.0.orig/debian/compat
+++ codespeak-lib-0.9.0/debian/compat
@@ -0,0 +1 @@
+5
--- codespeak-lib-0.9.0.orig/debian/patches/01-fix-scripts.dpatch
+++ codespeak-lib-0.9.0/debian/patches/01-fix-scripts.dpatch
@@ -0,0 +1,15 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-scripts.dpatch by  <alf@merlin>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: findpy not available in /usr/bin + use /usr/bin/python
+
+@DPATCH@
+
+--- codespeak-lib-0.7-svn20061228.orig/py/misc/cmdline/countloc.py      2006-12-28 14:14:32.000000000 +0100
++++ codespeak-lib-0.7-svn20061228/py/misc/cmdline/countloc.py   2007-01-05 17:23:04.000000000 +0100
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-
+ # hands on script to compute the non-empty Lines of Code 
+ # for tests and non-test code 
--- codespeak-lib-0.9.0.orig/debian/patches/03-distutils-setup.dpatch
+++ codespeak-lib-0.9.0/debian/patches/03-distutils-setup.dpatch
@@ -0,0 +1,63 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03-distutils-setup.dpatch by  <alf@merlin>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use stdlib's distutils for setup
+
+@DPATCH@
+
+--- pylib-0.9.0-beta.orig/setup.py      2007-01-31 23:23:24.000000000 +0100
++++ codespeak-lib-0.9.0-beta/setup.py   2007-02-13 16:32:19.000000000 +0100
+@@ -1,3 +1,49 @@
+-import py
+-from py.__.misc._dist import setup
+-setup(py) 
++from distutils.core import setup
++packages=['py',
++          'py.apigen',
++          'py.apigen.rest',
++          'py.apigen.source',
++          'py.apigen.tracer',
++          'py.builtin',
++          'py.code',
++          'py.compat',
++          'py.doc',
++          'py.execnet',
++          'py.io',
++          'py.log',
++          'py.magic',
++          'py.misc',
++          'py.misc.cmdline',
++          'py.path',
++          #'py.path.extpy',
++          'py.path.gateway',
++          'py.path.local',
++          'py.path.svn',
++          'py.process',
++          'py.rest',
++          'py.test',
++          'py.test.rsession',
++          'py.test.rsession.webdata',
++          'py.test.terminal',
++          'py.test.web',
++          'py.thread',
++          'py.tool',
++          'py.xmlobj'
++          ]
++
++scripts=['py/bin/py.cleanup',
++         'py/bin/py.countloc',
++         'py/bin/py.lookup',
++         'py/bin/py.rest',
++         'py/bin/py.test']
++
++package_data={'py.rsession.webdata': ['*.html', '*.js'],
++              'py.apigen': ['*.css', '*.js'],
++              'py.rest': ['*.template'],
++              'py.execnet': ['script/*.py'],
++              }
++
++setup(packages = packages,
++      scripts = scripts,
++      package_data = package_data
++      )  
--- codespeak-lib-0.9.0.orig/debian/patches/00list
+++ codespeak-lib-0.9.0/debian/patches/00list
@@ -0,0 +1,3 @@
+01-fix-scripts
+02-fix-greenlet-bustage
+03-distutils-setup
--- codespeak-lib-0.9.0.orig/debian/patches/02-fix-greenlet-bustage.dpatch
+++ codespeak-lib-0.9.0/debian/patches/02-fix-greenlet-bustage.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-fix-greenlet-bustage.dpatch by  <salgado@canario.async.com.br>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+
+--- codespeak-lib-0.7.orig/py/magic/greenlet.py
++++ codespeak-lib-0.7/py/magic/greenlet.py
+@@ -6,5 +6,5 @@
+     # regular CPython (or pypy without stackless support, and then crash :-)
+     import py
+     gdir = py.path.local(py.__file__).dirpath() 
+-    path = gdir.join('c-extension', 'greenlet', 'greenlet.c')
+-    greenlet = path._getpymodule().greenlet 
++    path = gdir.join('c-extension', 'greenlet', 'greenlet.so')
++    greenlet = path.pyimport().greenlet
--- codespeak-lib-0.9.0.orig/debian/py.countloc.xml
+++ codespeak-lib-0.9.0/debian/py.countloc.xml
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Alexandre</firstname>">
+  <!ENTITY dhsurname   "<surname>Fayolle</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>jan.  8, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>afayolle@debian.org</email>">
+  <!ENTITY dhusername  "Alexandre Fayolle">
+  <!ENTITY dhucpackage "<refentrytitle>python-codespeak-lib</refentrytitle>">
+  <!ENTITY dhpackage   "py.countloc">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>pylib line counter</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>filenames or directories...</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in html available in /usr/share/doc/python-codespeak-lib/.</para>
+
+    <para><command>&dhpackage;</command> is a program that computes number of non-empty lines of 
+    code in python modules. If one or more directories are given, python modules will be found 
+    recursivly. Test files and normal ones are identified and reported separately.
+
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- codespeak-lib-0.9.0.orig/debian/py.cleanup.xml
+++ codespeak-lib-0.9.0/debian/py.cleanup.xml
@@ -0,0 +1,110 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Alexandre</firstname>">
+  <!ENTITY dhsurname   "<surname>Fayolle</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>jan.  8, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>afayolle@debian.org</email>">
+  <!ENTITY dhusername  "Alexandre Fayolle">
+  <!ENTITY dhucpackage "<refentrytitle>python-codespeak-lib</refentrytitle>">
+  <!ENTITY dhpackage   "py.cleanup">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>pylib pyc cleaner</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>directories...</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in html available in /usr/share/doc/python-codespeak-lib/.</para>
+
+    <para><command>&dhpackage;</command> is a program that recursivly delete .pyc files 
+    from the given directories. Specify '.' as an argument to disable recursion. 
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- codespeak-lib-0.9.0.orig/debian/py.test.xml
+++ codespeak-lib-0.9.0/debian/py.test.xml
@@ -0,0 +1,299 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Alexandre</firstname>">
+  <!ENTITY dhsurname   "<surname>Fayolle</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>jan.  8, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>afayolle@debian.org</email>">
+  <!ENTITY dhusername  "Alexandre Fayolle">
+  <!ENTITY dhucpackage "<refentrytitle>python-codespeak-lib</refentrytitle>">
+  <!ENTITY dhpackage   "py.test">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>pylib test runner</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>option</replaceable></option></arg>
+
+      <arg><option><replaceable>query</replaceable></option></arg>
+      <arg><option><replaceable>filenames of tests...</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+    because the original program does not have a manual page.
+    Instead, it has documentation in html available in
+    /usr/share/doc/python-codespeak-lib/py/doc/test.html.</para>
+
+    <para><command>&dhpackage;</command> is a program that runs tests
+    in a module or directory specified on the command line. It looks
+    for functions and methods with names starting with 'test_' and run
+    those methods. Assertions about test outcomes are done via the
+    standard 'assert' statement.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below. </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options and exit.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-v</option>
+          <option>--verbose</option>
+        </term>
+        <listitem>
+          <para>Increase verbosity.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-x</option>
+          <option>--exitfirst</option>
+        </term>
+        <listitem>
+          <para>Exit on first error or failed test.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-s</option>
+          <option>--nocapture</option>
+        </term>
+        <listitem>
+          <para>Disable catching of sys.stdout/stderr output.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-k KEYWORD</option>
+        </term>
+        <listitem>
+          <para>only run tests matching the given keyword expression </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-l</option>
+          <option>--showlocals</option>
+        </term>
+        <listitem>
+          <para>Show local variables in traceback (disabled by default) </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--pdb</option>
+        </term>
+        <listitem>
+          <para>Start the python debugger on errors </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--tb=TBSTYLE</option>
+        </term>
+        <listitem>
+          <para>set the traceback style. TBSTYLE can be 'long', 'short' or 'no') </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--fulltrace</option>
+        </term>
+        <listitem>
+          <para>Do not cut tracebacks (default behavior is to cut) </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--nomagic</option>
+        </term>
+        <listitem>
+          <para>Refrain from using magic as much as possible </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--collectonly</option>
+        </term>
+        <listitem>
+          <para>Only collect tests, don't execute them </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--traceconfig</option>
+        </term>
+        <listitem>
+          <para>Trace consideration of conftest.py files </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--apigen</option>
+        </term>
+        <listitem>
+          <para>Generate api documentation while testing (requires initpkg/conftest config). </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--tkinter</option>
+        </term>
+        <listitem>
+          <para>use tkinter test session frontend (requires python-tkinter). </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--looponfailing</option>
+        </term>
+        <listitem>
+          <para>Loop on failing tests </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--session=SESSION</option>
+        </term>
+        <listitem>
+          <para>Use the given session class. Default is 'terminal'. </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--exec</option>
+        </term>
+        <listitem>
+          <para>python executable with which the tests should be run</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-w</option>
+          <option>--startserver</option>
+        </term>
+        <listitem>
+          <para>Start an HTTP server on localhost:8000 for test. </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--runbrowser</option>
+        </term>
+        <listitem>
+          <para>Point your browser to the server started with --startserver </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-r</option>
+          <option>--rest</option>
+        </term>
+        <listitem>
+          <para>Restructured Text test result output. </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- codespeak-lib-0.9.0.orig/debian/py.rest.xml
+++ codespeak-lib-0.9.0/debian/py.rest.xml
@@ -0,0 +1,150 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Alexandre</firstname>">
+  <!ENTITY dhsurname   "<surname>Fayolle</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>jan.  8, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>afayolle@debian.org</email>">
+  <!ENTITY dhusername  "Alexandre Fayolle">
+  <!ENTITY dhucpackage "<refentrytitle>python-codespeak-lib</refentrytitle>">
+  <!ENTITY dhpackage   "py.rest">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>pylib rest converter</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>option</replaceable></option></arg>
+      <arg><option><replaceable>filenames...</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in html available in /usr/share/doc/python-codespeak-lib/.</para>
+
+    <para><command>&dhpackage;</command> is a program that convert ReST file to HTML or PDF formats.
+    For more information on ReST: http://docutils.sourceforge.net/docs/user/rst/quickref.html.
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below. </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--topdf</option>
+        </term>
+        <listitem>
+          <para>transform to pdf instead of html.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--stylesheet=STYLESHEET</option>
+        </term>
+        <listitem>
+          <para>use specified LaTeX stylesheet for pdf conversion.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--debug</option>
+        </term>
+        <listitem>
+          <para>print debug output and don't delete intermediary files.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- codespeak-lib-0.9.0.orig/debian/py.lookup.xml
+++ codespeak-lib-0.9.0/debian/py.lookup.xml
@@ -0,0 +1,144 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Alexandre</firstname>">
+  <!ENTITY dhsurname   "<surname>Fayolle</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>jan.  8, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>afayolle@debian.org</email>">
+  <!ENTITY dhusername  "Alexandre Fayolle">
+  <!ENTITY dhucpackage "<refentrytitle>python-codespeak-lib</refentrytitle>">
+  <!ENTITY dhpackage   "py.lookup">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>pylib word lookup</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>option</replaceable></option></arg>
+      <arg><replaceable>search_string</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in html available in /usr/share/doc/python-codespeak-lib/.</para>
+
+    <para><command>&dhpackage;</command> is a program that search for a word (or quoted phrase)
+    into python modules under the current directory.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below. </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-i</option>
+          <option>--ignore-case</option>
+        </term>
+        <listitem>
+          <para>ignore case distinctions.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-C</option>
+          <option>--context=CONTEXT</option>
+        </term>
+        <listitem>
+          <para>how many lines of context to show for each match.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- codespeak-lib-0.9.0.orig/debian/control
+++ codespeak-lib-0.9.0/debian/control
@@ -0,0 +1,25 @@
+Source: codespeak-lib
+Section: python
+Priority: optional
+Maintainer: Guilherme Salgado <salgado@async.com.br>
+Uploaders: Alexandre Fayolle <afayolle@debian.org>
+Build-Depends: python-all-dev (>= 2.3.5-10), python-central (>= 0.5.6), debhelper (>= 5.0.38), dpatch, python-docutils, xsltproc, docbook-xsl, subversion, ssh
+XS-Python-Version: all
+Standards-Version: 3.7.2
+
+Package: python-codespeak-lib
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}
+Conflicts: python-pylib, python2.3-codespeak-lib, python2.4-codespeak-lib
+Replaces: python-pylib, python2.3-codespeak-lib, python2.4-codespeak-lib
+Recommends: python-tkinter, python-docutils
+Suggests:  screen, rsync, graphviz, tetex-bin, gs-gpl|gs-esp, ps2eps, subversion
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: The pylib library containing py.test, greenlets and other niceties
+ It includes py.test, whose focus is to get a test environment that's easier
+ to use than the existing ones, py.xml ("a fast'n'easy way to generate
+ xml/html documents"), py.magic.greenlet ("Lightweight in-process concurrent
+ programming") and many more features.
+ .
+ homepage: http://codespeak.net/py/
--- codespeak-lib-0.9.0.orig/debian/python-codespeak-lib.doc-base
+++ codespeak-lib-0.9.0/debian/python-codespeak-lib.doc-base
@@ -0,0 +1,9 @@
+Document: python-codespeak-lib
+Title: pylib documentation
+Author: Various Authors
+Abstract: How to use pylib
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/python-codespeak-lib/py/doc/index.html
+Files: /usr/share/doc/python-codespeak-lib/py/doc/*.html /usr/share/doc/python-codespeak-lib/py/doc/*/*.html 
--- codespeak-lib-0.9.0.orig/debian/lintian.override
+++ codespeak-lib-0.9.0/debian/lintian.override
@@ -0,0 +1,2 @@
+python-codespeak-lib: script-not-executable ./usr/share/pycentral/python-codespeak-lib/site-packages/py/execnet/script/shell.py
+python-codespeak-lib: script-not-executable ./usr/share/pycentral/python-codespeak-lib/site-packages/py/execnet/script/socketserver.py
--- codespeak-lib-0.9.0.orig/debian/rules
+++ codespeak-lib-0.9.0/debian/rules
@@ -0,0 +1,119 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PYVERS	:= $(shell pyversions -r -v)
+DEFPY   := $(shell pyversions -d -v)
+#PYVER	:= $(shell pyversions -d -v)
+
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+DOCBOOK_MANPAGES=$(wildcard debian/*.xml)
+MANPAGES=$(patsubst %.xml,%.1, $(DOCBOOK_MANPAGES))
+
+patch: patch-stamp
+patch-stamp:
+	dpatch apply-all
+	touch $@
+
+build: build-doc patch build-stamp
+
+build-doc: build-doc-stamp $(MANPAGES)
+	ls $(MANPAGES) > debian/python-codespeak-lib.manpages
+
+%.1: %.xml
+	$(XP) -o $@  $(DB2MAN) $< 
+
+build-doc-stamp: 
+	./py/bin/py.test --apigen=py/apigen/apigen.py py || true
+	echo "py/doc/* usr/share/doc/python-codespeak-lib/py/doc" >> debian/python-codespeak-lib.install
+	echo "apigen  usr/share/doc/python-codespeak-lib/" >> debian/python-codespeak-lib.install
+	touch $@
+
+build-stamp: $(PYVERS:%=build-python%)
+	dh_clean -k
+	python setup.py install --no-compile --prefix=debian/python-codespeak-lib/usr
+
+	cp -v py/test/rsession/webdata/*.html py/test/rsession/webdata/*.js debian/python-codespeak-lib/usr/lib/python$(DEFPY)/site-packages/py/test/rsession/webdata/ 
+	rm -f debian/python-codespeak-lib/usr/lib/python*/site-packages/py/env.py
+	for f in debian/python-codespeak-lib/usr/bin/* ; do \
+	    sed -i -e 's/from \_findpy import py/import py/' $$f ; \
+	done
+	touch $@
+
+build-python%:
+	if cd py/c-extension/greenlet/ && python$* setup.py build ; \
+	then \
+		cd - ; \
+		echo "successful build of C extension" ; \
+		echo "py/c-extension/greenlet/build/lib*$*/greenlet.so usr/lib/python$*/site-packages/py/c-extension/greenlet" >> debian/python-codespeak-lib.install ;\
+	else \
+		echo "greenlet unavailable for this architecture" ; \
+	fi
+	touch $@
+
+unpatch:
+	dpatch deapply-all
+	rm -rf patch-stamp debian/patched
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp 
+	rm -rf build 
+	rm -rf build-python* 
+	rm -f debian/python-codespeak-lib.install 
+	rm -f debian/python-codespeak-lib.docs 
+	rm -f debian/python-codespeak-lib.manpages
+	rm -f  $(MANPAGES) 
+	rm -rf py/c-extension/greenlet/greenlet.so \
+               py/rest/testing/data/*.png \
+               py/rest/testing/data/*.pdf \
+               py/rest/testing/data/*.toc \
+               py/rest/testing/data/*.html \
+               py/rest/testing/data/img \
+               py/c-extension/greenlet/build \
+               apigen
+
+	find . -name "*.pyc" -exec rm -f {} \;
+	find py/doc/ -name "*.html" -exec rm -f {} \;
+	dh_clean
+
+
+install: build 
+	dh_testdir
+	dh_testroot
+	dh_installdirs usr/share/lintian/overrides/
+	dh_install -a
+	cp debian/lintian.override debian/python-codespeak-lib/usr/share/lintian/overrides/python-codespeak-lib
+	chmod 644 debian/python-codespeak-lib/usr/lib/python*/site-packages/py/execnet/script/shell.py
+	rm -f debian/python-codespeak-lib/usr/share/doc/python-codespeak-lib/__init__.py
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -a
+	dh_installdocs -a
+	dh_installman -a
+	find debian/python-codespeak-lib -name .svn -exec rm -rf {} \; || true
+	dh_installexamples -a
+	dh_strip -a
+	dh_compress -a -X.py
+	dh_fixperms -a
+	dh_pycentral -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install unpatch
--- codespeak-lib-0.9.0.orig/debian/copyright
+++ codespeak-lib-0.9.0/debian/copyright
@@ -0,0 +1,43 @@
+This package was debianized by Guilherme Salgado <salgado@async.com.br> on
+Sat, 23 Jul 2005 10:48:20 -0300.
+
+It was downloaded from http://codespeak.net/
+
+Copyright:
+
+Upstream Authors: Holger Krekel (hpk at trillke net)
+                  Jens-Uwe Mager (jum at anubis han de)
+                  Philipp von Weitershausen (philipp at weitershausen de)
+
+License:
+
+py lib Copyright holders, 2003-2005
+-----------------------------------
+
+Except when otherwise stated (look for LICENSE files or information at
+the beginning of each file) the files in the 'py' directory are
+copyrighted by one or more of the following people and organizations:
+
+            Holger Krekel <hpk@trillke.net>
+            merlinux GmbH, Germany <office@merlinux.de>
+            Armin Rigo <arigo@tunes.org>
+            Jan Balster <jan@balster.info> (tkinter test backend)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
