public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] RFC: Redesign for 'best implementation' in python-r1
@ 2014-12-27 13:50 Michał Górny
  2014-12-28 12:00 ` Michał Górny
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michał Górny @ 2014-12-27 13:50 UTC (permalink / raw
  To: gentoo-python

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-02 23:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-27 13:50 [gentoo-python] RFC: Redesign for 'best implementation' in python-r1 Michał Górny
2014-12-28 12:00 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox