The python deb maker |
|
NEWS
LINKS
|
||||||||||||||||||||
"easy-deb"
creates debian source
packages of python
modules.
After its execution you will
have the source package into a
deb-pkg-<modulename> directory.
The source packages created can
then be compiled using the standard
debian tools (debuild or "fakeroot debian/rules binary").
Generated debian source packages will compile into binary debian packages containing python eggs. This makes python eggs visible to the packaging system: you can see what easy-deb-packaged-python-modules are installed using synaptic, aptitude ... Eggs installed by the binary
package can be handled using update-pypi
tool (included).
The source distribution for the module passed on the command line can be a module name, an URL, or filename: easy-deb will use setuptools to download and unpack, then it will create the debian subdirectory and populate its files with metadata extracted from the module distribution. (For details about python eggs you can point your browser to the link:http://peak.telecommunity.com/DevCenter/PythonEggs). Dependencies are automatically converted from python 'Requires:' lines to debian package names using a conversion database: when a python module requires module foo the generated package must depend on package python-foo or package python-pypi-foo or package bar (names can actually be completely different). easy-deb can convert names using a hand written database. Moreover a second database stores dependencies for modules not providing "Requires:" lines (PKG-INFO files version 1.1 and above will have "Requires:" lines). |
|||||||||||||||||||||
|
|||||||||||||||||||||
Suppose you 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 $ easy-deb -v2.4 -D /tmp delegate The above commands will create source packages of graph and delegate for python2.4 . The graph package will depend on the delegate package. $ cd /tmp/deb-pkg-graph-0.4/python-pypi-graph-0.4 && debuild $ cd /tmp/deb-pkg-delegate-0.1/python-pypi-delegate-0.1 && debuild Now to install the packages type: $ sudo dpkg -i/tmp/deb-pkg-graph-0.4/python-pypi-graph-0.4/*.deb $ sudo dpkg -i/tmp/deb-pkg-delegate-0.1/python-pypi-delegate-0.1/*.deb easy-deb can do automatic dependency with python modules that have "Requires:" lines in theyr PKG-INFO. If you want to change the configuration edit /etc/easydeb/config.cfg. There you can change the maintainer of the generated package and the location of mapping and dependencies databases. These files are plain config files (like windows ini files). The default installation config and databases are a good example to understand. For example, to add a new mapping you must edit the file specified in the config file, adding a line like: tk: tk8.0-dev, python-tk The example shows that one requirement can be mapped to more than one package. To add the dependencies for a module that doesn't provide a PKG-INFO file with "Requires:" lines, you must edit the dependencies database and add something like: graph: python-pypi-delegate This tells easy-deb to add python the python-pypy-delegate package to the list of dependencies for module graph. You can support more than one distribution: just create common databases and distribution specific ones. Then in the config file for (e.g.) distro1 you specify a coma separated list of database files which include both, like: deps-dbs: /etc/easydeb/common/deps.db, /etc/easy-deb/distro1/my-deps.db |
|||||||||||||||||||||
|
|||||||||||||||||||||
Future enhancements:
|
|||||||||||||||||||||
|
|||||||||||||||||||||
Summer of Code is the google
project that founded this project.
Google is acting very friendly toward free software community by paying students like me to work on open source projects. 400 students worked hard this summer to develop free and open source software. For more informations: Google SoC 2005 webpage |
|||||||||||||||||||||
|
|||||||||||||||||||||
E-mail:hawk.it@tiscali.it
Jabber: hawk@jabber.linux.it |