bytecompiling python modules of a multipel binary source package
- To: debian-python@lists.debian.org
- Subject: bytecompiling python modules of a multipel binary source package
- From: Serafeim Zanikolas <serzan@hellug.gr>
- Date: Mon, 14 Apr 2008 00:52:35 +0100
- Message-id: <20080413235235.GB21236@localhost>
Hi all,
I would appreciate advice on a packaging issue which I've dealt with, but
probably not in the most elegant way.
I'm packaging a set of pure python modules (ITP #473039), which are part of a
single module and share a few common files. So in /usr/share/python-support/
we have:
python-nodebox-web/nodebox_web/web/ (files required by all other modules)
python-nodebox-web/nodebox_web/web/wikipedia
python-nodebox-web/nodebox_web/web/yahoo
[..]
where the non -common ones are independent of each other.
These are packaged as
python-nodebox-web-common
python-nodebox-web-wikipedia
python-nodebox-web-yahoo
[..] (where the latter depend on -common)
This setting produces pyc files for all packages in the same dir:
/var/lib/python-support/python2.*/nodebox_web/web/
I'm using python-support, which produces a prerm script for every binary. The
script removes the whole directory above, which means that, eg when one has
-common -wikipedia and -yahoo installed and deletes -yahoo, then -wikipedia
will also not work.
The way I deal with this is having a .prerm script for every non -common
binary that wipes the whole directory (update-python-modules -c), and then
recreates the dir in a .postrm script (update-python-modules). This works but
requires a .prerm and .postrm scripts for every binary. (I can't use a single
pair of scripts for all, because -common must only call update-python-modules
-c. (Or I could if I could tell from within a single prerm script which
package the script is ran for.)
Another way would be to put the modules in a different namespace, as in
/var/lib/python-support/python2.*/nodebox_web/web-wikipedia
/var/lib/python-support/python2.*/nodebox_web/web-yahoo
but that would require patching the programs that use these modules, to use
the new names (which seems much worse). Any ideas for a better way? Am I
missing something?
For those interested the package is at:
http://mentors.debian.net/debian/pool/main/n/nodebox-web/nodebox-web_1.9.2-1.dsc
Thanks,
Serafeim
Reply to: