On Jul 27, 2011, at 10:45 PM, Piotr Ożarowski wrote:

>[Barry Warsaw, 2011-07-27]
>> Another question about the intent of dh_python2, this time as it relates to
>> private packages.
>> 
>> So, I'm converting ibus-table, which installs some .py files into
>> /usr/share/ibus-table/engine.  I've been playing with different incantations
>> of the binary-indep rule:
>> 
>>         ...
>>      dh_python2
>>      dh_python2 /usr/share/ibus-table/engine
>> 
>> which is what we're currently recommending people on the transitions page.  
>> If
>> I look at the resulting usr/share/python/runtime.d/ibus-table.rtupdate, I see
>> two sections:
>> 
>> -----snip snip-----
>> #! /bin/sh
>> set -e
>> if [ "$1" = rtupdate ]; then
>>      pyclean /usr/share/ibus-table
>>      pycompile  /usr/share/ibus-table
>> fi
>> if [ "$1" = rtupdate ]; then
>>      pyclean /usr/share/ibus-table/engine
>>      pycompile  /usr/share/ibus-table/engine
>> fi
>> -----snip snip-----
>> 
>> Now, there's nothing wrong with this, but the first stanza is unnecessary.
>> The only .py files laid down by the package are in
>> /usr/share/ibus-table/engine, so only the second stanza does anything useful.
>> The first doesn't hurt but it's unnecessary, afaict.
>
>doesn't dh_python2 alone do the right thing?

I think not.  With just

    dh_python2

I get the first stanza but not the second one.

>Do you really need
>`dh_python2 /usr/share/ibus-table/engine`? If you do, then I need to
>change pyclean/pycompile a bit (and add support for "-p" and dir
>argument at the same time)

That would probably work.

Cheers,
-Barry

Attachment: signature.asc
Description: PGP signature

Reply via email to