From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B0CE713800E for ; Mon, 30 Jul 2012 15:19:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37569E0484; Mon, 30 Jul 2012 15:19:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0778CE0484 for ; Mon, 30 Jul 2012 15:19:09 +0000 (UTC) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 3FC921B400A for ; Mon, 30 Jul 2012 15:19:09 +0000 (UTC) Received: by wgbfm10 with SMTP id fm10so3944813wgb.10 for ; Mon, 30 Jul 2012 08:19:06 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org MIME-Version: 1.0 Received: by 10.180.78.37 with SMTP id y5mr2284192wiw.16.1343661546832; Mon, 30 Jul 2012 08:19:06 -0700 (PDT) Received: by 10.223.3.142 with HTTP; Mon, 30 Jul 2012 08:19:06 -0700 (PDT) In-Reply-To: References: <5015EDC2.202@gentoo.org> Date: Mon, 30 Jul 2012 11:19:06 -0400 Message-ID: Subject: Re: [gentoo-python] Python 3 in Gentoo From: Mike Gilbert To: gentoo-python Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 948c007b-cf7f-4e8d-a38d-e3138216cc30 X-Archives-Hash: be31840620477bd970bec1dcd90a4e7c On Mon, Jul 30, 2012 at 3:36 AM, Dirkjan Ochtman wrote: > I agree that installing both is probably overkill for most users. I > think the solution is somewhere outside the dev-lang/python package, > though, in having the system set or portage or whatever the hell it is > that first pulls in python prefer python-2. I looked into this, and there are currently two things that will pull python-3 into a stage3: 1. sys-apps/portage due to its >=dev-lang/python-2.7[ssl] dependency. 2. app-admin/python-updater has a bare "dev-lang/python" dependency. I have verified that if you install python:2.7, and adjust those dependencies to the following, portage will no longer try to pull in python-3.2 on a world update. sys-apps/portage: DEPEND="|| ( =dev-lang/python-3*[ssl] dev-lang/python:2.7[ssl] dev-lang/python:2.6[threads,ssl] )" app-admin/python-updater: DEPEND="|| ( dev-lang/python-3* dev-lang/python-2* )" The || deps are key here; this causes portage to weight an already installed package over the rest. In fact, if you reverse the order of python-3 and python-2, that SHOULD cause python-2 to be pulled into the stage building process instead of python-3. So, another possible alternative here is to scour the tree, replacing any dependencies on dev-lang/python with || deps. I believe python.eclass would also need to be updated. Does that sound like an acceptable solution?