From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python@lists.gentoo.org
Cc: python@gentoo.org
Subject: [gentoo-python] RFC: naming of EPYTHON-variants of scripts
Date: Mon, 26 Aug 2013 10:16:49 +0200 [thread overview]
Message-ID: <20130826101649.74a09af8@gentoo.org> (raw)
[-- 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 --]
reply other threads:[~2013-08-26 8:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130826101649.74a09af8@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-python@lists.gentoo.org \
--cc=python@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox