[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to package a binary provided by python2 and python3



On Nov 04, 2014, at 10:21 PM, Etienne Millon wrote:

>The best practice is indeed to discard the binary in one of the
>packages, like your solution 1. However, it is better to use the
>python3 version (this is the recommended way now, can't find the
>debian-python thread from earlier this year).

Correct.

In a *very* limited set of cases, you might want to ship both versions, but
this is reserved for cases where the user of the command actually cares about
which Python version they're using.  Examples are usually developer tools like
nose/nose2.

For all other cases, it is recommended that you ship only the Python 3
version, specifically with a shebang of /usr/bin/python3.

>If most of your users will use only the binary, they shouldn't have to
>know that it's written in python, so you can add an extra binary
>package that only ships the binary. In this case, you can also do it
>using a virtual package (just add a Provides: fiona to python3-fiona
>for example) but I think that it is clearer with a real package.

The virtual package is a nice trick.  Usually I create a third, separate
binary package that only contains the /usr/bin script, a manpage, and maybe a
few other non-Python-version specific bits.

Cheers,
-Barry

Attachment: signature.asc
Description: PGP signature


Reply to: