Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo development <gentoo-dev@l.g.o>
Cc: "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-dev] [PATCH 29/30] dev-libs/libwacom: Use python_has_version for verbose output
Date: Tue, 08 Feb 2022 23:18:54
Message-Id: CAEdQ38H-Rzf8jk4D1Es=iAmAwa-vZu9pGNaF0-UKrSx6MQRXMA@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH 29/30] dev-libs/libwacom: Use python_has_version for verbose output by Matt Turner
1 On Tue, Feb 8, 2022 at 3:00 PM Matt Turner <mattst88@g.o> wrote:
2 >
3 > On Sun, Feb 6, 2022 at 4:57 AM Michał Górny <mgorny@g.o> wrote:
4 > >
5 > > Signed-off-by: Michał Górny <mgorny@g.o>
6 > > ---
7 > > dev-libs/libwacom/libwacom-1.11.ebuild | 6 +++---
8 > > dev-libs/libwacom/libwacom-1.12.ebuild | 6 +++---
9 > > 2 files changed, 6 insertions(+), 6 deletions(-)
10 > >
11 > > diff --git a/dev-libs/libwacom/libwacom-1.11.ebuild b/dev-libs/libwacom/libwacom-1.11.ebuild
12 > > index acfda32d8405..3e406d573b91 100644
13 > > --- a/dev-libs/libwacom/libwacom-1.11.ebuild
14 > > +++ b/dev-libs/libwacom/libwacom-1.11.ebuild
15 > > @@ -35,9 +35,9 @@ BDEPEND="
16 > > "
17 > >
18 > > python_check_deps() {
19 > > - has_version -b "dev-python/python-libevdev[${PYTHON_USEDEP}]" &&
20 > > - has_version -b "dev-python/pyudev[${PYTHON_USEDEP}]" &&
21 > > - has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
22 > > + python_has_version -b "dev-python/python-libevdev[${PYTHON_USEDEP}]" &&
23 > > + python_has_version -b "dev-python/pyudev[${PYTHON_USEDEP}]" &&
24 > > + python_has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
25 > > }
26 > >
27 > > pkg_setup() {
28 > > diff --git a/dev-libs/libwacom/libwacom-1.12.ebuild b/dev-libs/libwacom/libwacom-1.12.ebuild
29 > > index acfda32d8405..3e406d573b91 100644
30 > > --- a/dev-libs/libwacom/libwacom-1.12.ebuild
31 > > +++ b/dev-libs/libwacom/libwacom-1.12.ebuild
32 > > @@ -35,9 +35,9 @@ BDEPEND="
33 > > "
34 > >
35 > > python_check_deps() {
36 > > - has_version -b "dev-python/python-libevdev[${PYTHON_USEDEP}]" &&
37 > > - has_version -b "dev-python/pyudev[${PYTHON_USEDEP}]" &&
38 > > - has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
39 > > + python_has_version -b "dev-python/python-libevdev[${PYTHON_USEDEP}]" &&
40 > > + python_has_version -b "dev-python/pyudev[${PYTHON_USEDEP}]" &&
41 > > + python_has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
42 > > }
43 > >
44 >
45 > I like this, but just a question -- is this patch just an example of
46 > how we can transition other ebuilds, or are you planning a
47 > larger-scale replacement?
48 >
49 > Also, I've always felt a little uncomfortable with the
50 > python_check_deps() functions because of how easy it is to mess them
51 > up. E.g., app-emulation/spice/spice-0.15.0.ebuild contains:
52 >
53 > python_check_deps() {
54 > has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
55 > has_version -b "dev-python/six[${PYTHON_USEDEP}]"
56 > }
57 >
58 > It should have a &&, right? There are many more instances of this in ::gentoo.
59
60 Hm, maybe it's less common than I thought. The only other instance I
61 could find in a quick scan was
62 dev-python/dbus-python/dbus-python-1.2.18.ebuild.