Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o
Subject: Re: [gentoo-dev] [PATCH 1/3] python-utils-r1.eclass: Allow -2/-3 as impl-patterns for py2/py3
Date: Wed, 10 May 2017 21:36:44
Message-Id: 1494452175.4139.1.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/3] python-utils-r1.eclass: Allow -2/-3 as impl-patterns for py2/py3 by Patrick McLean
1 On śro, 2017-05-10 at 14:15 -0700, Patrick McLean wrote:
2 > On Wed, 10 May 2017 20:53:31 +0200
3 > Michał Górny <mgorny@g.o> wrote:
4 >
5 > > Allow two special values in the implementation patterns for
6 > > _python_impl_matches(): -2 to indicate all Python 2-compatible
7 > > implementations, and -3 to indicate all Python 3-compatible
8 > > implementations. Both of those values are implemented using
9 > > the python_is_python3 function.
10 >
11 > Seems mostly reasonable, though the syntax is somewhat confusing at
12 > first glance. There are many places where we use "-value" to negate, so
13 > this looks like it means "not python 2" rather than "all python 2".
14 > Perhaps something like '+2' would make it easier to read.
15
16 Well, it was supposed to correspond to option parameters, so that it
17 doesn't collide with regular template matching. But '+' works for me
18 too, same as anything. Or '@2'. Or '${py2}' ;-P.
19
20 >
21 > > This is mostly meant to make it easier and more fool-proof to write
22 > > dependencies on backports to Python 2 which in most cases apply to
23 > > PyPy2 as well.
24 >
25 >
26
27 --
28 Best regards,
29 Michał Górny

Attachments

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