Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o
Subject: [gentoo-python] RFC: naming of EPYTHON-variants of scripts
Date: Mon, 26 Aug 2013 08:16:44
Hello, all.

Currently we've inherited the script naming scheme used by
python.eclass, then modified by python-distutils-ng and then modified
again by us. However, this has a few disadvantages.

The scripts are named like:


and a wrapper is installed in /usr/bin/foo.


- easy access to every variant (in $PATH).


- tab completion polluted with all those variants,

- argv[0] changed which makes some software unhappy.

As a quick idea, here's an alternative:


(or something similar, path needs to be discussed)


- wrapper could be mostly 'replaced' by placing those dirs in $PATH,
  in specific order,

- we can let user decide on *exact* order of implementation preference
  without making code complex,

- basename(argv[0]) is preserved.


- handling locations outside standard $PATH locations could result in
  'deep' directory structure (do we have any?),

- potential $PATH pollution (6-8 paths in the 'worst' case). Do modern
  systems have any trouble with that?

- harder to choose a specific implementation. 'foo-python2.7' nor
  'EPYTHON=python2.7' would work anymore. You'd need to pass the full

- we will probably still need the wrapper in /usr/bin because of
  software that doesn't do $PATH lookups.

I feel like the second idea is the way forward. Though for implementing
it we will probably need to either kill off python.eclass for good, or
patch it to support the new way. Supporting it in python-r1 is pretty

Best regards,
Michał Górny


File name MIME type
signature.asc application/pgp-signature