Reputation: 531
As a follow-up to How do I write a setup.py for a twistd/twisted plugin that works with setuptools, distribute, etc?, how does one make a debian package for a twisted plugin?
Assuming the setup.py is properly written, using cdbs/python-central/dh_python2 should just work, but I haven't had much luck so far.
The trick with those tools is that they basically run 'python setup.py install --root=' and then package up whatever ends up in '', so perhaps once the previous question is properly answered, then this question becomes moot?
Anyone here has successfully packaged a twisted plugin for debian?
Upvotes: 14
Views: 1110
Reputation: 131
Argh, I've tried to do this and failed. I think it's possible depending on which Debian/Ubuntu releases you want to target, and how much effort you want to put in.
There are two approaches:
twisted/plugins/
in the twisted tree. This is a pain because Twisted is packaged using different methods in different releases (python-support
in Lucid vs dh_python2
in Natty IIRC) and (roughly speaking) your package needs to be packaged the same way as Twisted is to make this work.twisted/plugins/
directory installed alongside your code. Then, IIRC, the problem becomes having the forest of symlinks that gets created include the twisted directory (as it's not a package).Upvotes: 1
Reputation: 531
Apparently the issue is with 'python-support', which is plain broken when it comes to twisted plugins.
This message from Ubuntu's Matthias Klose explains the issue and offers a solution:
packaging of twisted plugins with python-support is broken by design. Even python policy mentions explicitly that you should use the same packaging helper for packages sharing the same python namespace.
You should use dh_python2 for that, or (deprecated) build with dh_pycentral using `include-links'.
-- Matthias Klose
Upvotes: 3