* [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
@ 2010-01-10 8:29 Arfrever Frehtes Taifersar Arahesis
2010-01-10 18:41 ` Sebastian Pipping
2010-01-10 20:56 ` Fabian Groffen
0 siblings, 2 replies; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-10 8:29 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 1385 bytes --]
I would like to suggest introduction of support for PYTHON_DEPEND variable, which
would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
does not allow to specify that e.g. only versions of Python 2 are accepted.
(Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
not supporting installation for multiple versions of Python.)
Suggested syntax:
PYTHON_DEPEND="[USE_flag?] <X[:[Y][:[Z]]]> [X[:[Y][:[Z]]]]"
<required_component>, [optional_component]
X - Major version of Python ('2' or '3') or '*'.
Y - Minimal version of Python in the form of ${major_version}.${minor_version}.
Z - Maximal version of Python in the form of ${major_version}.${minor_version}.
It will be probably very rarely used.
Examples:
PYTHON_DEPEND="2"
Dependency on any version of Python 2.
PYTHON_DEPEND="2:2.5"
Dependency on Python 2.7, 2.6 or 2.5.
PYTHON_DEPEND="*:2.6"
Dependency on Python 3.2, 3.1, 3.0, 2.7 or 2.6.
PYTHON_DEPEND="2:2.7 3:3.1"
Dependency on Python 3.2, 3.1 or 2.7.
PYTHON_DEPEND="2:2.5:2.6"
Dependency on Python 2.6 or 2.5.
PYTHON_DEPEND="2::2.6"
Dependency on Python 2.6, 2.5 or 2.4.
PYTHON_DEPEND="python? 2"
Dependency on any version of Python 2 when "python" USE flag is enabled.
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-10 8:29 [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON Arfrever Frehtes Taifersar Arahesis
@ 2010-01-10 18:41 ` Sebastian Pipping
2010-01-10 21:50 ` Arfrever Frehtes Taifersar Arahesis
2010-01-10 20:56 ` Fabian Groffen
1 sibling, 1 reply; 17+ messages in thread
From: Sebastian Pipping @ 2010-01-10 18:41 UTC (permalink / raw
To: gentoo-dev
On 01/10/10 09:29, Arfrever Frehtes Taifersar Arahesis wrote:
> I would like to suggest introduction of support for PYTHON_DEPEND variable, which
> would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
> does not allow to specify that e.g. only versions of Python 2 are accepted.
> (Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
> not supporting installation for multiple versions of Python.)
>
> Suggested syntax:
> PYTHON_DEPEND="[USE_flag?] <X[:[Y][:[Z]]]> [X[:[Y][:[Z]]]]"
> <required_component>, [optional_component]
> X - Major version of Python ('2' or '3') or '*'.
> Y - Minimal version of Python in the form of ${major_version}.${minor_version}.
> Z - Maximal version of Python in the form of ${major_version}.${minor_version}.
> It will be probably very rarely used.
>
> Examples:
> PYTHON_DEPEND="2"
> Dependency on any version of Python 2.
>
> PYTHON_DEPEND="2:2.5"
> Dependency on Python 2.7, 2.6 or 2.5.
>
> PYTHON_DEPEND="*:2.6"
> Dependency on Python 3.2, 3.1, 3.0, 2.7 or 2.6.
>
> PYTHON_DEPEND="2:2.7 3:3.1"
> Dependency on Python 3.2, 3.1 or 2.7.
>
> PYTHON_DEPEND="2:2.5:2.6"
> Dependency on Python 2.6 or 2.5.
>
> PYTHON_DEPEND="2::2.6"
> Dependency on Python 2.6, 2.5 or 2.4.
>
> PYTHON_DEPEND="python? 2"
> Dependency on any version of Python 2 when "python" USE flag is enabled.
>
While I don't object improvements or changes on that front at all:
- How are SUPPORT_PYTHON_ABIS and RESTRICT_PYTHON_ABIS affected
by NEED_PYTHON now and by PYTHON_DEPEND in the future?
- The proposed approach doesn't look intuitive to me from a quick
view, sorry: Neither the examples nor the grammar. I didn't give
it that much time to be fair, though.
Sebastian
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-10 8:29 [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON Arfrever Frehtes Taifersar Arahesis
2010-01-10 18:41 ` Sebastian Pipping
@ 2010-01-10 20:56 ` Fabian Groffen
2010-01-11 0:25 ` Arfrever Frehtes Taifersar Arahesis
1 sibling, 1 reply; 17+ messages in thread
From: Fabian Groffen @ 2010-01-10 20:56 UTC (permalink / raw
To: gentoo-dev
On 10-01-2010 09:29:28 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> I would like to suggest introduction of support for PYTHON_DEPEND variable, which
> would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
> does not allow to specify that e.g. only versions of Python 2 are accepted.
> (Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
> not supporting installation for multiple versions of Python.)
Can you explain the intended use of this variable, and why normal DEPEND
is not sufficient?
--
Fabian Groffen
Gentoo on a different level
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-10 18:41 ` Sebastian Pipping
@ 2010-01-10 21:50 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 3:55 ` Sebastian Pipping
0 siblings, 1 reply; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-10 21:50 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 2219 bytes --]
2010-01-10 19:41:55 Sebastian Pipping napisał(a):
> On 01/10/10 09:29, Arfrever Frehtes Taifersar Arahesis wrote:
> > I would like to suggest introduction of support for PYTHON_DEPEND variable, which
> > would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
> > does not allow to specify that e.g. only versions of Python 2 are accepted.
> > (Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
> > not supporting installation for multiple versions of Python.)
> >
> > Suggested syntax:
> > PYTHON_DEPEND="[USE_flag?] <X[:[Y][:[Z]]]> [X[:[Y][:[Z]]]]"
> > <required_component>, [optional_component]
> > X - Major version of Python ('2' or '3') or '*'.
> > Y - Minimal version of Python in the form of ${major_version}.${minor_version}.
> > Z - Maximal version of Python in the form of ${major_version}.${minor_version}.
> > It will be probably very rarely used.
> >
> > Examples:
> > PYTHON_DEPEND="2"
> > Dependency on any version of Python 2.
> >
> > PYTHON_DEPEND="2:2.5"
> > Dependency on Python 2.7, 2.6 or 2.5.
> >
> > PYTHON_DEPEND="*:2.6"
> > Dependency on Python 3.2, 3.1, 3.0, 2.7 or 2.6.
> >
> > PYTHON_DEPEND="2:2.7 3:3.1"
> > Dependency on Python 3.2, 3.1 or 2.7.
> >
> > PYTHON_DEPEND="2:2.5:2.6"
> > Dependency on Python 2.6 or 2.5.
> >
> > PYTHON_DEPEND="2::2.6"
> > Dependency on Python 2.6, 2.5 or 2.4.
> >
> > PYTHON_DEPEND="python? 2"
> > Dependency on any version of Python 2 when "python" USE flag is enabled.
> >
>
> While I don't object improvements or changes on that front at all:
>
> - How are SUPPORT_PYTHON_ABIS and RESTRICT_PYTHON_ABIS affected
> by NEED_PYTHON now and by PYTHON_DEPEND in the future?
They aren't and won't be. PYTHON_DEPEND is designed mainly for packages
not supporting installation for multiple Python versions.
> - The proposed approach doesn't look intuitive to me from a quick
> view, sorry: Neither the examples nor the grammar. I didn't give
> it that much time to be fair, though.
IMHO it's sufficiently intuitive :) .
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-10 20:56 ` Fabian Groffen
@ 2010-01-11 0:25 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 7:50 ` Fabian Groffen
2010-01-11 10:14 ` Maciej Mrozowski
0 siblings, 2 replies; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-11 0:25 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 881 bytes --]
2010-01-10 21:56:01 Fabian Groffen napisał(a):
> On 10-01-2010 09:29:28 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > I would like to suggest introduction of support for PYTHON_DEPEND variable, which
> > would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
> > does not allow to specify that e.g. only versions of Python 2 are accepted.
> > (Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
> > not supporting installation for multiple versions of Python.)
>
> Can you explain the intended use of this variable, and why normal DEPEND
> is not sufficient?
PYTHON_DEPEND is intented to simplify specification of dependency on Python.
PYTHON_DEPEND="2:2.5" is shorter than:
DEPEND="|| ( =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-10 21:50 ` Arfrever Frehtes Taifersar Arahesis
@ 2010-01-11 3:55 ` Sebastian Pipping
2010-01-11 8:47 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 1 reply; 17+ messages in thread
From: Sebastian Pipping @ 2010-01-11 3:55 UTC (permalink / raw
To: gentoo-dev
>>> PYTHON_DEPEND="2:2.5:2.6"
>>> Dependency on Python 2.6 or 2.5.
The colon (':') has two different semantics here.
This violates "different things should look different".
You are designing a language here. Please improve the proposal.
Sebastian
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 0:25 ` Arfrever Frehtes Taifersar Arahesis
@ 2010-01-11 7:50 ` Fabian Groffen
2010-01-11 8:29 ` [gentoo-dev] " Duncan
2010-01-11 9:00 ` [gentoo-dev] " Arfrever Frehtes Taifersar Arahesis
2010-01-11 10:14 ` Maciej Mrozowski
1 sibling, 2 replies; 17+ messages in thread
From: Fabian Groffen @ 2010-01-11 7:50 UTC (permalink / raw
To: gentoo-dev
On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > Can you explain the intended use of this variable, and why normal DEPEND
> > is not sufficient?
>
> PYTHON_DEPEND is intented to simplify specification of dependency on Python.
>
> PYTHON_DEPEND="2:2.5" is shorter than:
> DEPEND="|| ( =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
So if there is enough space to express the dependency with the current
syntax, is it worth introducing a new shorthand for it then?
Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
would have expected 2.0 ... 2.5. Maybe the language isn't as intuitive
then as Sebastian pointed out.
--
Fabian Groffen
Gentoo on a different level
^ permalink raw reply [flat|nested] 17+ messages in thread
* [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 7:50 ` Fabian Groffen
@ 2010-01-11 8:29 ` Duncan
2010-01-11 10:14 ` Fabian Groffen
2010-01-11 9:00 ` [gentoo-dev] " Arfrever Frehtes Taifersar Arahesis
1 sibling, 1 reply; 17+ messages in thread
From: Duncan @ 2010-01-11 8:29 UTC (permalink / raw
To: gentoo-dev
Fabian Groffen posted on Mon, 11 Jan 2010 08:50:30 +0100 as excerpted:
> On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
>> > Can you explain the intended use of this variable, and why normal
>> > DEPEND is not sufficient?
>>
>> PYTHON_DEPEND is intented to simplify specification of dependency on
>> Python.
>>
>> PYTHON_DEPEND="2:2.5" is shorter than: DEPEND="|| (
>> =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
>
> So if there is enough space to express the dependency with the current
> syntax, is it worth introducing a new shorthand for it then?
>
> Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
> would have expected 2.0 ... 2.5. Maybe the language isn't as intuitive
> then as Sebastian pointed out.
Initially intuitive, perhaps not, but reasonably easy after reading the
explanation:
The first position is major python version, the second if present,
minimal version (within that major), so it can be read as =>version, the
third if present, maximum version (within that major), so it can be read
as <=.
Thus, the above "2:2.5" means major version 2, minimal version 2.5 (no
maximum version within that major), so 2.5+.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 3:55 ` Sebastian Pipping
@ 2010-01-11 8:47 ` Arfrever Frehtes Taifersar Arahesis
2010-01-12 3:20 ` Sebastian Pipping
0 siblings, 1 reply; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-11 8:47 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 353 bytes --]
2010-01-11 04:55:02 Sebastian Pipping napisał(a):
> >>> PYTHON_DEPEND="2:2.5:2.6"
> >>> Dependency on Python 2.6 or 2.5.
>
> The colon (':') has two different semantics here.
The colon is only separator of components, so it has the same semantic.
Each component has strictly defined meaning.
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 7:50 ` Fabian Groffen
2010-01-11 8:29 ` [gentoo-dev] " Duncan
@ 2010-01-11 9:00 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 11:04 ` Gilles Dartiguelongue
1 sibling, 1 reply; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-11 9:00 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 1339 bytes --]
2010-01-11 08:50:30 Fabian Groffen napisał(a):
> On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > > Can you explain the intended use of this variable, and why normal DEPEND
> > > is not sufficient?
> >
> > PYTHON_DEPEND is intented to simplify specification of dependency on Python.
> >
> > PYTHON_DEPEND="2:2.5" is shorter than:
> > DEPEND="|| ( =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
>
> So if there is enough space to express the dependency with the current
> syntax, is it worth introducing a new shorthand for it then?
Some eclasses already support some shorthands for specification of some
dependencies (e.g. need_apache2() in depend.apache.eclass).
As maintainer of some packages depending on Python, I express interest in
possibility of brief specification of dependency on Python. I won't be
enforcing using of this variable for developers, who want to directly
specify dependencies in {,R}DEPEND.
> Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
> would have expected 2.0 ... 2.5.
The first component ('2') specifies the group of accepted versions.
The second component ('2.5') specifies the minimal accepted version inside
this group. ('2:2.5' is identical to '2:2.5:'.)
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 0:25 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 7:50 ` Fabian Groffen
@ 2010-01-11 10:14 ` Maciej Mrozowski
2010-01-12 14:11 ` Arfrever Frehtes Taifersar Arahesis
1 sibling, 1 reply; 17+ messages in thread
From: Maciej Mrozowski @ 2010-01-11 10:14 UTC (permalink / raw
To: gentoo-dev
On Monday 11 of January 2010 01:25:45 Arfrever Frehtes Taifersar Arahesis
wrote:
> 2010-01-10 21:56:01 Fabian Groffen napisał(a):
> > On 10-01-2010 09:29:28 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > > I would like to suggest introduction of support for PYTHON_DEPEND
> > > variable, which would be a better replacement for NEED_PYTHON
> > > variable. NEED_PYTHON variable does not allow to specify that e.g.
> > > only versions of Python 2 are accepted. (Eventually PYTHON_DEPEND
> > > variable will have to be set only in ebuilds of packages not
> > > supporting installation for multiple versions of Python.)
> >
> > Can you explain the intended use of this variable, and why normal DEPEND
> > is not sufficient?
>
> PYTHON_DEPEND is intented to simplify specification of dependency on
> Python.
>
> PYTHON_DEPEND="2:2.5" is shorter than:
> DEPEND="|| ( =dev-lang/python-2.7* =dev-lang/python-2.6*
> =dev-lang/python-2.5* )"
Doesn't that accidentally mean that dev-lang/python is improperly slotted and
all 2.x releases should be slotted with :2?
So that dependency string would look like:
DEPEND=">=dev-lang/python-2.5.0:2"
--
regards
MM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 8:29 ` [gentoo-dev] " Duncan
@ 2010-01-11 10:14 ` Fabian Groffen
2010-01-12 14:16 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 1 reply; 17+ messages in thread
From: Fabian Groffen @ 2010-01-11 10:14 UTC (permalink / raw
To: gentoo-dev
On 11-01-2010 08:29:32 +0000, Duncan wrote:
> Fabian Groffen posted on Mon, 11 Jan 2010 08:50:30 +0100 as excerpted:
>
> > On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> >> > Can you explain the intended use of this variable, and why normal
> >> > DEPEND is not sufficient?
> >>
> >> PYTHON_DEPEND is intented to simplify specification of dependency on
> >> Python.
> >>
> >> PYTHON_DEPEND="2:2.5" is shorter than: DEPEND="|| (
> >> =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
> >
> > So if there is enough space to express the dependency with the current
> > syntax, is it worth introducing a new shorthand for it then?
> >
> > Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
> > would have expected 2.0 ... 2.5. Maybe the language isn't as intuitive
> > then as Sebastian pointed out.
>
> Initially intuitive, perhaps not, but reasonably easy after reading the
> explanation:
>
> The first position is major python version, the second if present,
> minimal version (within that major), so it can be read as =>version, the
> third if present, maximum version (within that major), so it can be read
> as <=.
>
> Thus, the above "2:2.5" means major version 2, minimal version 2.5 (no
> maximum version within that major), so 2.5+.
what's wrong with ">=2.5 && <3.0" then?
--
Fabian Groffen
Gentoo on a different level
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 9:00 ` [gentoo-dev] " Arfrever Frehtes Taifersar Arahesis
@ 2010-01-11 11:04 ` Gilles Dartiguelongue
2010-01-12 14:07 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 1 reply; 17+ messages in thread
From: Gilles Dartiguelongue @ 2010-01-11 11:04 UTC (permalink / raw
To: gentoo-dev
It looks like what you really want is a ranged dependencies. From the
look of it though I have to second the "it does not seem intuitive"
opinion as it gives another meaning to the slot syntax marker (':').
Other than that, it seems like a worthy addition to the eclass.
--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 8:47 ` Arfrever Frehtes Taifersar Arahesis
@ 2010-01-12 3:20 ` Sebastian Pipping
0 siblings, 0 replies; 17+ messages in thread
From: Sebastian Pipping @ 2010-01-12 3:20 UTC (permalink / raw
To: gentoo-dev, Robert Buchholz
On 01/11/10 09:47, Arfrever Frehtes Taifersar Arahesis wrote:
> 2010-01-11 04:55:02 Sebastian Pipping napisał(a):
>>>>> PYTHON_DEPEND="2:2.5:2.6"
>>>>> Dependency on Python 2.6 or 2.5.
>>
>> The colon (':') has two different semantics here.
>
> The colon is only separator of components, so it has the same semantic.
> Each component has strictly defined meaning.
The first ':' is a slot colon while the second one is a from-to colon. I
fail to see how that is the same semantic.
Also, in normal dependency notation the slot is suffix-like (e.g.
package:2) whereas in this syntax it's prefix-like - the opposite.
Wouldn't it be more intuitive to make suffix-like use of it?
Looking from another angle there is range syntax being used for
kernel-check already. It looks like this:
[linux >=2.6.16 <2.6.31]
(examples on <http://dev.gentoo.org/~asym/guide.xml>)
Maybe you could adjust that to your needs. I'm not sure where that
syntax is defined but afair rbu should be a good contact on that subject
(Robert?).
Sebastian
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 11:04 ` Gilles Dartiguelongue
@ 2010-01-12 14:07 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 0 replies; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-12 14:07 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 294 bytes --]
2010-01-11 12:04:05 Gilles Dartiguelongue napisał(a):
> It looks like what you really want is a ranged dependencies.
Dependencies specified in PYTHON_DEPEND can be expanded into ranged
dependencies in EAPIs, which support ranged dependencies.
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 10:14 ` Maciej Mrozowski
@ 2010-01-12 14:11 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 0 replies; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-12 14:11 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 1270 bytes --]
2010-01-11 11:14:11 Maciej Mrozowski napisał(a):
> On Monday 11 of January 2010 01:25:45 Arfrever Frehtes Taifersar Arahesis
> wrote:
> > 2010-01-10 21:56:01 Fabian Groffen napisał(a):
> > > On 10-01-2010 09:29:28 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > > > I would like to suggest introduction of support for PYTHON_DEPEND
> > > > variable, which would be a better replacement for NEED_PYTHON
> > > > variable. NEED_PYTHON variable does not allow to specify that e.g.
> > > > only versions of Python 2 are accepted. (Eventually PYTHON_DEPEND
> > > > variable will have to be set only in ebuilds of packages not
> > > > supporting installation for multiple versions of Python.)
> > >
> > > Can you explain the intended use of this variable, and why normal DEPEND
> > > is not sufficient?
> >
> > PYTHON_DEPEND is intented to simplify specification of dependency on
> > Python.
> >
> > PYTHON_DEPEND="2:2.5" is shorter than:
> > DEPEND="|| ( =dev-lang/python-2.7* =dev-lang/python-2.6*
> > =dev-lang/python-2.5* )"
>
> Doesn't that accidentally mean that dev-lang/python is improperly slotted and
> all 2.x releases should be slotted with :2?
dev-lang/python is properly slotted.
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
2010-01-11 10:14 ` Fabian Groffen
@ 2010-01-12 14:16 ` Arfrever Frehtes Taifersar Arahesis
0 siblings, 0 replies; 17+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-01-12 14:16 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: Text/Plain, Size: 1586 bytes --]
2010-01-11 11:14:40 Fabian Groffen napisał(a):
> On 11-01-2010 08:29:32 +0000, Duncan wrote:
> > Fabian Groffen posted on Mon, 11 Jan 2010 08:50:30 +0100 as excerpted:
> >
> > > On 11-01-2010 01:25:45 +0100, Arfrever Frehtes Taifersar Arahesis wrote:
> > >> > Can you explain the intended use of this variable, and why normal
> > >> > DEPEND is not sufficient?
> > >>
> > >> PYTHON_DEPEND is intented to simplify specification of dependency on
> > >> Python.
> > >>
> > >> PYTHON_DEPEND="2:2.5" is shorter than: DEPEND="|| (
> > >> =dev-lang/python-2.7* =dev-lang/python-2.6* =dev-lang/python-2.5* )"
> > >
> > > So if there is enough space to express the dependency with the current
> > > syntax, is it worth introducing a new shorthand for it then?
> > >
> > > Also for this example, why does 2:2.5 expand to 2.7, 2.6 and 2.5? I
> > > would have expected 2.0 ... 2.5. Maybe the language isn't as intuitive
> > > then as Sebastian pointed out.
> >
> > Initially intuitive, perhaps not, but reasonably easy after reading the
> > explanation:
> >
> > The first position is major python version, the second if present,
> > minimal version (within that major), so it can be read as =>version, the
> > third if present, maximum version (within that major), so it can be read
> > as <=.
> >
> > Thus, the above "2:2.5" means major version 2, minimal version 2.5 (no
> > maximum version within that major), so 2.5+.
>
> what's wrong with ">=2.5 && <3.0" then?
It's too long and harder to parse.
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-01-12 14:12 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10 8:29 [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON Arfrever Frehtes Taifersar Arahesis
2010-01-10 18:41 ` Sebastian Pipping
2010-01-10 21:50 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 3:55 ` Sebastian Pipping
2010-01-11 8:47 ` Arfrever Frehtes Taifersar Arahesis
2010-01-12 3:20 ` Sebastian Pipping
2010-01-10 20:56 ` Fabian Groffen
2010-01-11 0:25 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 7:50 ` Fabian Groffen
2010-01-11 8:29 ` [gentoo-dev] " Duncan
2010-01-11 10:14 ` Fabian Groffen
2010-01-12 14:16 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 9:00 ` [gentoo-dev] " Arfrever Frehtes Taifersar Arahesis
2010-01-11 11:04 ` Gilles Dartiguelongue
2010-01-12 14:07 ` Arfrever Frehtes Taifersar Arahesis
2010-01-11 10:14 ` Maciej Mrozowski
2010-01-12 14:11 ` Arfrever Frehtes Taifersar Arahesis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox