[Distutils] Low Level API for translating distutils/setuptools metatdata to Debian metadata

Andrew Straw strawman at astraw.com
Fri May 29 17:35:16 CEST 2009


Brian Sutherland wrote:
> Hi,
> 
> I've just published a very small library that does three things so far:
> 
>     * Provides a mapping between python project names and Debian
>       binary/source package names
>     * Converts setuptools versions to Debian versions while maintaining
>       sort order
>     * Can introspect an .egg-info directory to figure out the Debian
>       dependencies for use in the debian/control file. It can also
>       handle/understand extras (I Hope!)
> 
> It's basically an attempt to find a common ground between all the
> projects doing automated Python->Debian packaging. I have a feeling
> everyone is re-implementing this code all the time.

The stdeb package certainly needs most of these things, so it would be
nice to consolidate the implementation. It looks like there's some very
useful stuff in van.pydeb along with good tests. I'll attempt to convert
stdeb to use it. Do you have a public source code repository for
van.pydeb in case I want to start making patches?

> And an example of direct use in a packaging situation with complex dependencies is here:
> 
>     http://svn.debian.org/viewsvn/pkg-zope/zope.component/trunk/debian/rules?view=markup

As an aside, now that I've been looking at debian/rules files made for
debhelper 7 and python-support, that file looks bloated to my eye. (Of
course, if you're targeting older Debians without dh7, there's not much
you can do.) FWIW stdeb is growing dh7 support in the "dh7" branch. For
example, stdeb just generated this debian/rules file, which is
completely functional:

#!/usr/bin/make -f

# This file was automatically generated by stdeb 0.3+git+dh7 at
# Thu, 28 May 2009 15:38:44 -0700

%:
        dh $@



More information about the Distutils-SIG mailing list