Gentoo Archives: gentoo-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
Date: Mon, 11 Jan 2010 12:09:34
Message-Id: 20100111101440.GB886@gentoo.org
In Reply to: [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON by Duncan <1i5t5.duncan@cox.net>
1 On 11-01-2010 08:29:32 +0000, Duncan wrote:
2 > Fabian Groffen posted on Mon, 11 Jan 2010 08:50:30 +0100 as excerpted:
3 >
4 > > On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
5 > >> > Can you explain the intended use of this variable, and why normal
6 > >> > DEPEND is not sufficient?
7 > >>
8 > >> PYTHON_DEPEND is intented to simplify specification of dependency on
9 > >> Python.
10 > >>
11 > >> PYTHON_DEPEND="2:2.5" is shorter than: DEPEND="|| (
12 > >> =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
13 > >
14 > > So if there is enough space to express the dependency with the current
15 > > syntax, is it worth introducing a new shorthand for it then?
16 > >
17 > > Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
18 > > would have expected 2.0 ... 2.5. Maybe the language isn't as intuitive
19 > > then as Sebastian pointed out.
20 >
21 > Initially intuitive, perhaps not, but reasonably easy after reading the
22 > explanation:
23 >
24 > The first position is major python version, the second if present,
25 > minimal version (within that major), so it can be read as =>version, the
26 > third if present, maximum version (within that major), so it can be read
27 > as <=.
28 >
29 > Thus, the above "2:2.5" means major version 2, minimal version 2.5 (no
30 > maximum version within that major), so 2.5+.
31
32 what's wrong with ">=2.5 && <3.0" then?
33
34
35 --
36 Fabian Groffen
37 Gentoo on a different level

Replies

Subject Author
Re: [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>