[Distutils] Need some advice on extending install_data
Robert Park
rbpark at exolucere.ca
Sat May 12 10:58:38 CEST 2012
So, I'm using distutils with some success lately, and I've borrowed
some code that extends install_data to compile .po (translation) files
into .mo files to be used by the system to display the translated
strings. It looks like this:
https://github.com/robru/gottengeography/blob/master/setup.py
It seems fairly straightforward to me and there's only a tiny amount
of magic involved.
However, upon testing this, I've discovered this behavior:
1. When running `setup.py install`, the mo files are correctly
compiled and installed to the system.
2. When running `setup.py bdist`, the resulting tarball will correctly
compile and include the mo files for distribution.
3. When running `setup.py bdist_rpm`, the resulting RPM file does not
contain any trace of any .po or .mo files.
I'm not sure why bdist_rpm is the odd man out here, but it seems like
I'm overlooking something simple. Unfortunately the API reference
seems a little light on details:
http://docs.python.org/distutils/apiref.html#module-distutils.command.bdist
So I'm not entirely clear on how I should go about overriding
bdist_rpm to achieve the same thing as is done by overriding
install_data. At this point I am reviewing the distutils source code
directly but it's been less instructive than I'd hoped.
Any ideas?
Thanks.
--
http://exolucere.ca
More information about the Distutils-SIG
mailing list