Gentoo Archives: gentoo-dev

From: Sebastian Pipping <sping@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON
Date: Sun, 10 Jan 2010 20:11:37
Message-Id: 4B4A1F73.7040603@gentoo.org
In Reply to: [gentoo-dev] PYTHON_DEPEND - Suggested replacement for NEED_PYTHON by Arfrever Frehtes Taifersar Arahesis
1 On 01/10/10 09:29, Arfrever Frehtes Taifersar Arahesis wrote:
2 > I would like to suggest introduction of support for PYTHON_DEPEND variable, which
3 > would be a better replacement for NEED_PYTHON variable. NEED_PYTHON variable
4 > does not allow to specify that e.g. only versions of Python 2 are accepted.
5 > (Eventually PYTHON_DEPEND variable will have to be set only in ebuilds of packages
6 > not supporting installation for multiple versions of Python.)
7 >
8 > Suggested syntax:
9 > PYTHON_DEPEND="[USE_flag?] <X[:[Y][:[Z]]]> [X[:[Y][:[Z]]]]"
10 > <required_component>, [optional_component]
11 > X - Major version of Python ('2' or '3') or '*'.
12 > Y - Minimal version of Python in the form of ${major_version}.${minor_version}.
13 > Z - Maximal version of Python in the form of ${major_version}.${minor_version}.
14 > It will be probably very rarely used.
15 >
16 > Examples:
17 > PYTHON_DEPEND="2"
18 > Dependency on any version of Python 2.
19 >
20 > PYTHON_DEPEND="2:2.5"
21 > Dependency on Python 2.7, 2.6 or 2.5.
22 >
23 > PYTHON_DEPEND="*:2.6"
24 > Dependency on Python 3.2, 3.1, 3.0, 2.7 or 2.6.
25 >
26 > PYTHON_DEPEND="2:2.7 3:3.1"
27 > Dependency on Python 3.2, 3.1 or 2.7.
28 >
29 > PYTHON_DEPEND="2:2.5:2.6"
30 > Dependency on Python 2.6 or 2.5.
31 >
32 > PYTHON_DEPEND="2::2.6"
33 > Dependency on Python 2.6, 2.5 or 2.4.
34 >
35 > PYTHON_DEPEND="python? 2"
36 > Dependency on any version of Python 2 when "python" USE flag is enabled.
37 >
38
39 While I don't object improvements or changes on that front at all:
40
41 - How are SUPPORT_PYTHON_ABIS and RESTRICT_PYTHON_ABIS affected
42 by NEED_PYTHON now and by PYTHON_DEPEND in the future?
43
44 - The proposed approach doesn't look intuitive to me from a quick
45 view, sorry: Neither the examples nor the grammar. I didn't give
46 it that much time to be fair, though.
47
48
49
50 Sebastian

Replies

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