Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: gentoo-python <gentoo-python@l.g.o>
Subject: Re: [gentoo-python] Python 3 in Gentoo
Date: Mon, 30 Jul 2012 15:19:13
Message-Id: CAJ0EP41WDQDFe6ekHj_EP5OyTT2Z_--Df+JeEaX_j=bG+KLfig@mail.gmail.com
In Reply to: Re: [gentoo-python] Python 3 in Gentoo by Dirkjan Ochtman
1 On Mon, Jul 30, 2012 at 3:36 AM, Dirkjan Ochtman <djc@g.o> wrote:
2 > I agree that installing both is probably overkill for most users. I
3 > think the solution is somewhere outside the dev-lang/python package,
4 > though, in having the system set or portage or whatever the hell it is
5 > that first pulls in python prefer python-2.
6
7 I looked into this, and there are currently two things that will pull
8 python-3 into a stage3:
9
10 1. sys-apps/portage due to its >=dev-lang/python-2.7[ssl] dependency.
11 2. app-admin/python-updater has a bare "dev-lang/python" dependency.
12
13 I have verified that if you install python:2.7, and adjust those
14 dependencies to the following, portage will no longer try to pull in
15 python-3.2 on a world update.
16
17 sys-apps/portage:
18
19 DEPEND="|| ( =dev-lang/python-3*[ssl] dev-lang/python:2.7[ssl]
20 dev-lang/python:2.6[threads,ssl] )"
21
22 app-admin/python-updater:
23
24 DEPEND="|| ( dev-lang/python-3* dev-lang/python-2* )"
25
26 The || deps are key here; this causes portage to weight an already
27 installed package over the rest.
28
29 In fact, if you reverse the order of python-3 and python-2, that
30 SHOULD cause python-2 to be pulled into the stage building process
31 instead of python-3.
32
33 So, another possible alternative here is to scour the tree, replacing
34 any dependencies on dev-lang/python with || deps. I believe
35 python.eclass would also need to be updated. Does that sound like an
36 acceptable solution?

Replies

Subject Author
Re: [gentoo-python] Python 3 in Gentoo Dirkjan Ochtman <djc@g.o>
Re: [gentoo-python] Python 3 in Gentoo Thomas Sachau <tommy@g.o>