easy-deb tutorial:

After easy-deb is installed you have:
* the easy-deb tool
* the update-pypi tool
* a default database of mappings 
* a default configuration file

The first think you should do is to review the /etc/easydeb/config.cfg file.
the default version looks something like:

[easydeb]
deps-dbs: /etc/easydeb/common/deps.db, /etc/easydeb/deps-local.db
#maintainer: Vincenzo Di Massa <hawk.it@tiscali.it>
mapping-dbs: /etc/easydeb/common/mapping.db

Defaults are ok, but you need to chage the maintainer name and eamil.

You can have a look at easy-deb managed packages using

$ update-pypi show

installed (/var/lib/easydeb/python2.4/pths/installed/)
-       All


available (/var/lib/easydeb/python2.4/pths/available/)
-       All

$

"All" is a special package: if you unistall it pkg_resources.require() function
will not find easy-deb created packages. That could be useful if you want to
test temporairily disable all easy-deb packages without removing them.

Suppose you now want to package  the "graph" module. It is available on pypi,
so, to get the sources and create a debian source archive, you type:

$ easy-deb -v2.4 -d python-pypi-delegate -D /tmp graph

this will create an unpacked source debian package into
/tmp/deb-pkg-graph-0.4/.

The options passed to easy-deb are:
 * -v2.4 : create a package the will be for python 2.4 only (graph does not
   support 2.3)
 * -d python-pypi-delegate : graph depends on delegate but does not have a
   PKG-INFO file with a "Requires: delegate" line. We will need to package
   delegate too
 * -D /tmp/ : put the source pkg on /tmp
 * graph : package module graph (will be searched and downloaded from pypi)

Now cd to 

$ cd /tmp/deb-pkg-graph-0.4/python-pypi-graph-0.4

and type

$ dpkg-buildpackage -rfakeroot

After some seconds you will have the graph packages built.
Try to type:

$ ls ../

graph-0.4.tar.gz                    python-pypi-graph_0.4-1_all.deb  python-pypi-graph_0.4-1_i386.changes
python2.4-pypi-graph_0.4-1_all.deb  python-pypi-graph_0.4-1.dsc      python-pypi-graph_0.4-1.tar.gz
python-pypi-graph-0.4               python-pypi-graph_0.4-1.dsc.asc  python-pypi-graph-0.4.orig.tar.gz

You can't already install them! You must first build and install delegate. Type:
$ easy-deb -v2.4 -D /tmp delegate

then build the package as you did for graph.
After you have run dpkg-buildpackage, you can install delegate :

$ sudo dpkg -i ../*.deb

that way delegate will be installed on your system.
Now go to /tmp/deb-pkg-graph-0.4/python-pypi-graph-0.4

$ cd /tmp/deb-pkg-graph-0.4/python-pypi-graph-0.4

and 

$ sudo dpkg -i ../*.deb

Now you can type:

$ update-pypi show
installed (/var/lib/easydeb/python2.4/pths/installed/)
-       All


available (/var/lib/easydeb/python2.4/pths/available/)
-       All
-       graph
-       delegate

Here you can see that the two packages are availiable topkg_resources.require()
but are not installed into sys.path.
To install them into sys.path:

$ sudo update-pypi -a graph
Adding graph
Added.
$ sudo update-pypi -a delegate
Adding delegate
Added.
$ update-pypi show
installed (/var/lib/easydeb/python2.4/pths/installed/)
-       All
-       graph
-       delegate


available (/var/lib/easydeb/python2.4/pths/available/)
-       All
-       graph
-       delegate


Enjoy python, debian, ubuntu, ... and easy-deb!
