From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python <gentoo-python@lists.gentoo.org>
Subject: [gentoo-python] RFC: Redesign for 'best implementation' in python-r1
Date: Sat, 27 Dec 2014 14:50:43 +0100 [thread overview]
Message-ID: <20141227145043.63b3731e@pomiot.lan> (raw)
[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]
Hello,
The current design for getting the 'best implementation' is far from
pretty. It pretty much relies on constant preference order, setting
Python 2.7 over other implementations for practical reasons. As a side
effect, various ebuilds rely on that particular order, e.g.:
DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )"
REQUIRED_USE="doc? ( $(python_gen_useflags 'python2*') )"
which pretty much assumes that *if python2 is enabled*, then any
version of it will be the best impl. I find this disgusting, and I'd
like to replace it with something more explicit.
Specifically:
1. python_export_best becomes deprecated for good,
2. python_setup changes API to:
python_setup [<impl-wildcard>...]
alike python_gen_* functions, defaulting to '*'. Now it chooses
the best impl from implementations matching the specified patterns,
e.g.:
python_setup 'python2*'
would get the best version of CPython 2.
3. we introduce extra variable for distutils-r1 (oh cruel world, how
should we name it?!) that applies wildcards to python_*_all() phases.
As for the choice within the list the algo needs to stay as-is for now.
However, in the future we could either:
a. respect EPYTHON and fallback to the other algo,
b. respect pre-defined order i.e. 3.4 > 2.7,
c. respect the order in PYTHON_COMPAT -- however that could be a little
surprising to devs.
What are your thoughts?
--
Best regards,
Michał Górny
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
next reply other threads:[~2014-12-27 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-27 13:50 Michał Górny [this message]
2014-12-28 12:00 ` [gentoo-python] RFC: Redesign for 'best implementation' in python-r1 Michał Górny
2014-12-31 16:41 ` Mike Gilbert
2015-01-02 23:21 ` Michał Górny
2015-01-02 23:37 ` Michał Górny
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=20141227145043.63b3731e@pomiot.lan \
--to=mgorny@gentoo.org \
--cc=gentoo-python@lists.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