Re: Python package providing both modules and an app
On 07/05/2016 04:47 PM, Hugo Lefeuvre wrote:
> Hi Thomas,
>
>> I did lots of that in OpenStack. You can have a look at one of our tool
>> to handle the dh_auto_install for Python:
>>
>> http://anonscm.debian.org/cgit/openstack/openstack-pkg-tools.git/tree/build-tools/pkgos-dh_auto_install
>>
>> The way to use it in your debian/rules file is to do:
>> pkgos-alternative slugify slugify
>>
>> [ this tool is available at:
>> http://anonscm.debian.org/cgit/openstack/openstack-pkg-tools.git/tree/misc/pkgos-alternative-bin
>> ]
>>
>> then simply do:
>>
>> override_dh_auto_install:
>> pkgos-dh_auto_install
>>
>> and that's it, it will handle the /usr/bin/python{3,}-slugify
>> alternative implementations for you.
>
> That looks very interesting !
>
> However, I have to say I'm a bit reluctant to make the package depend on a
> supplementary Build-Dependency only in order to prettify debian/rules.
You don't have to do that. You can open pkgos-dh_auto_install, see what
it does, and pickup ideas there. It's only 10 lines of shell scripts,
and you probably don't even need everything that's inside.
Cheers,
Thomas Goirand (zigo)
Reply to: