[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian scotch Python egg?



David contacted me directly about how to Debianize his project's source, but I
thought it would be better to follow up in the mlist.  I know that I have ways
I prefer, but I'm certain others here have different approaches.  There's many
ways to get there, so you just need to find the one that works for you.

The first step of course, is to ensure you have a good, solid setup.py and
that e.g. building and installing your package in a virtualenv works on Debian
and/or Ubuntu.  Sounds like you have that.

One way to Debianize your packages is to just cargo cult a basic debian
directory from another package.  I humbly offer flufl.enum as an example for
how to build a simple, pure-Python package, but there are lots of others in
the debian-python svn.  You really don't need much, although it can seem a bit
daunting when you start out.

One tool I like that can help, and has pretty good Python support, is pkgme:

    https://launchpad.net/pkgme

It's not in Debian or Ubuntu, but it should be easy to run it from source.
pkgme is nice because it can do pretty good dependency analysis from your
setup.py.  I think the trunk uses dh_python2.  I don't think it has much
documentation, but maybe it doesn't need much.

You can also look at stdeb, which adds a new `debianize` command to produce a
Debian source package:

    http://pypi.python.org/pypi/stdeb

I haven't used it in a while, but I think it also uses dh_python2 and produces
a pretty good template to start with.

dh_make is another possibility, but I don't think it has much Python
knowledge.

Hope that helps,
-Barry


Reply to: