FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 01-11-2010, 09:14 AM
Maciej Mrozowski
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 
Old 01-11-2010, 09:14 AM
Fabian Groffen
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 
Old 01-12-2010, 02:20 AM
Sebastian Pipping
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 
Old 01-12-2010, 01:07 PM
Arfrever Frehtes Taifersar Arahesis
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 
Old 01-12-2010, 01:11 PM
Arfrever Frehtes Taifersar Arahesis
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 
Old 01-12-2010, 01:16 PM
Arfrever Frehtes Taifersar Arahesis
 
Default PYTHON_DEPEND - Suggested replacement for NEED_PYTHON

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
 

Thread Tools




All times are GMT. The time now is 06:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org