Discussion:
python packaging
Mark Ellis
2008-02-11 12:14:26 UTC
Permalink
Hi Jonny

Following on from my fun and games with the opensync python plugin, I
was looking into debian python packages and policy (I need to get out
more).

It looks like we've been following much the same ideas lately, but I was
hoping you'd had some bright ideas I hadn't yet :) I'm going to run
through what I've found out for the list, someone else may know some
good stuff.

Debian python policy (which you may well know) says we should build
extensions for each version of python in one package called
python-{packagename}. This seems relatively easy for packages that use
python distutils/setuptools, throw it at cdbs and it does it for you.
Our stuff uses pyrex and autotools, so we need some custom stuff in
debian/rules to build two trees, then throw in python-central or
python-support to bundle it all into the right place.

I've had a bit of a go picking rules from other python extensions, got
the closest using pyorbit, but not quite successful. Have you had a go
at this ?

Someone also asked me a little while ago about supporting different
python versions in relation to ubuntu, John Carr maybe ?

Mark
Jonny Lamb
2008-02-11 13:30:45 UTC
Permalink
Post by Mark Ellis
Hi Jonny
Hi Mark.
Post by Mark Ellis
Debian python policy (which you may well know) says we should build
extensions for each version of python in one package called
python-{packagename}. This seems relatively easy for packages that use
python distutils/setuptools, throw it at cdbs and it does it for you.
Our stuff uses pyrex and autotools, so we need some custom stuff in
debian/rules to build two trees, then throw in python-central or
python-support to bundle it all into the right place.
I've had a bit of a go picking rules from other python extensions, got
the closest using pyorbit, but not quite successful. Have you had a go
at this ?
Amusingly, I'm looking into that right at the moment. I realise I have
got that pyrex-module-packaging aspect incorrect and will sort it very
soon. [0] contains some information and links on how to get this
working. I might move from CDBS to straight debhelper whilst sorting
this out too. Out of interest, where did you experience this problem?
Thinking about it now, I suspect it's present with librapi2, librra,
librtfcomp and (perhaps) pywbxml (the bindings around wbxml2, not the
pure-python implementation).

On a slightly-related note, I have found a sponsor for my Debian
packages, and they are being updated in Debian as we speak. This is
great news, no? :-)

Regards,

[0] http://wiki.debian.org/DebianPython/NewPolicy
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Mark Ellis
2008-02-11 13:36:46 UTC
Permalink
Post by Jonny Lamb
Post by Mark Ellis
Hi Jonny
Hi Mark.
Post by Mark Ellis
Debian python policy (which you may well know) says we should build
extensions for each version of python in one package called
python-{packagename}. This seems relatively easy for packages that use
python distutils/setuptools, throw it at cdbs and it does it for you.
Our stuff uses pyrex and autotools, so we need some custom stuff in
debian/rules to build two trees, then throw in python-central or
python-support to bundle it all into the right place.
I've had a bit of a go picking rules from other python extensions, got
the closest using pyorbit, but not quite successful. Have you had a go
at this ?
Amusingly, I'm looking into that right at the moment. I realise I have
got that pyrex-module-packaging aspect incorrect and will sort it very
soon. [0] contains some information and links on how to get this
working. I might move from CDBS to straight debhelper whilst sorting
this out too. Out of interest, where did you experience this problem?
Thinking about it now, I suspect it's present with librapi2, librra,
librtfcomp and (perhaps) pywbxml (the bindings around wbxml2, not the
pure-python implementation).
I guessed you probably would be :)

[0] was the page that depressed me so much, being full of examples of
every kind of build I could imagine except ours. I think moving away
from CDBS is the only way to go at the moment, especially since in the
package docs they explicitly say

"It is not yet capable of handling very complicated situations, like
packages where multiple C or C++ builds with different options and/or
patches are required,"

which seems to me to include python extensions for multiple versions
that dont use setuptools. Sigh.

I originally came across it with pywbxml. I was only packaging this to
host sync-engine 0.11 in my repository, but as soon as I dug a bit
realized that it would indeed affect rapi2, rra, and rtfcomp.

I don't think it's actually that hard to fix, but it does need more
in-depth knowledge of the deb build system than I currently have. I
would definitely recommend a quick look at pyorbit if you want to
investigate, it's the closest to ours I have found.
Post by Jonny Lamb
On a slightly-related note, I have found a sponsor for my Debian
packages, and they are being updated in Debian as we speak. This is
great news, no? :-)
This is so cool I have to censor my own response !

Mark
Jonny Lamb
2008-02-11 14:04:52 UTC
Permalink
Post by Mark Ellis
[0] was the page that depressed me so much, being full of examples of
every kind of build I could imagine except ours. I think moving away
from CDBS is the only way to go at the moment, especially since in the
package docs they explicitly say
Haha, yes you're right. Lots of examples, but totally unlike our
situation!
Post by Mark Ellis
I don't think it's actually that hard to fix, but it does need more
in-depth knowledge of the deb build system than I currently have. I
would definitely recommend a quick look at pyorbit if you want to
investigate, it's the closest to ours I have found.
Cool. Well, I'll hopefully get this sorted today, but I do have a *lot*
to do for later.. We shall see.

Thanks,
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Jonny Lamb
2008-02-12 23:54:45 UTC
Permalink
Hi Mark,
Post by Mark Ellis
I've had a bit of a go picking rules from other python extensions, got
the closest using pyorbit, but not quite successful. Have you had a go
at this ?
I sorted this out today. I've moved from cdbs to debhelper as a result,
but it seems to work fine now. You can check out what I've done from
my git repos. The gitweb URL is:

http://git.jonnylamb.com/

Hope this is helpful.

Regards,
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Mark Ellis
2008-02-13 10:02:38 UTC
Permalink
Post by Jonny Lamb
Hi Mark,
Post by Mark Ellis
I've had a bit of a go picking rules from other python extensions, got
the closest using pyorbit, but not quite successful. Have you had a go
at this ?
I sorted this out today. I've moved from cdbs to debhelper as a result,
but it seems to work fine now. You can check out what I've done from
http://git.jonnylamb.com/
Hope this is helpful.
Good man !

Nice catch Jonny, this looks perfect. You've even built dbg packages,
you star !

Mark

Loading...