* [gentoo-python] RFC: naming of EPYTHON-variants of scripts
@ 2013-08-26 8:16 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2013-08-26 8:16 UTC (permalink / raw
To: gentoo-python; +Cc: python
[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]
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:
/usr/bin/foo-pythonX.Y
and a wrapper is installed in /usr/bin/foo.
Advantages:
- easy access to every variant (in $PATH).
Disadvantages:
- tab completion polluted with all those variants,
- argv[0] changed which makes some software unhappy.
As a quick idea, here's an alternative:
/usr/lib/python-scripts/pythonX.Y/foo
(or something similar, path needs to be discussed)
Advantages:
- 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.
Disadvantages:
- 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
path,
- 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
straightforward.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-26 8:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 8:16 [gentoo-python] RFC: naming of EPYTHON-variants of scripts Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox