Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>, gentoo-python@l.g.o
Subject: Re: [gentoo-python] Wrapping scripts for multiple Python implementations: executable wrapper or symlinks?
Date: Sun, 30 Sep 2012 03:42:29
Message-Id: CAJ0EP41YAG8=MiMUAEp=O8d9KNGpcpoarzP6Fa4zN=BhZJX5nw@mail.gmail.com
In Reply to: [gentoo-python] Wrapping scripts for multiple Python implementations: executable wrapper or symlinks? by "Michał Górny"
1 On Sat, Sep 29, 2012 at 4:46 PM, Michał Górny <mgorny@g.o> wrote:
2 > Hello,
3 >
4 > Right now we have two different ways of 'wrapping' Python scripts
5 > 'converted' for various Python implementations. One of them
6 > is the wrapper script installed by python.eclass, the other symlinking
7 > done by python-distutils-ng.eclass.
8 >
9 > I would like to ask you which one do you consider better, and thus
10 > which one should I use for python-r1/distutils-r1.
11 >
12
13 Of the choices, the wrapper idea (option 1) would be my preference.
14 Functionality-wise, it is closest to what we have with the generated
15 wrappers.
16
17 The symlink option sucks given the way eselect python works.
18
19 Another problem with option 3 (generic shebangs) is how to decide
20 which version of the script should be the one installed with a generic
21 shebang. It is possible that a package may run 2to3 as one of the
22 installation steps, which would mean that you would not have a script
23 that would work in both python2 and python3.

Replies