Gentoo Archives: gentoo-dev

From: Patrick McLean <chutzpah@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, 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:15:25
Message-Id: 20170510141506.2e40093b@patrickm
In Reply to: [gentoo-dev] [PATCH 1/3] python-utils-r1.eclass: Allow -2/-3 as impl-patterns for py2/py3 by "Michał Górny"
1 On Wed, 10 May 2017 20:53:31 +0200
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Allow two special values in the implementation patterns for
5 > _python_impl_matches(): -2 to indicate all Python 2-compatible
6 > implementations, and -3 to indicate all Python 3-compatible
7 > implementations. Both of those values are implemented using
8 > the python_is_python3 function.
9
10 Seems mostly reasonable, though the syntax is somewhat confusing at
11 first glance. There are many places where we use "-value" to negate, so
12 this looks like it means "not python 2" rather than "all python 2".
13 Perhaps something like '+2' would make it easier to read.
14
15 > This is mostly meant to make it easier and more fool-proof to write
16 > dependencies on backports to Python 2 which in most cases apply to
17 > PyPy2 as well.

Replies