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 3509D138306 for ; Sun, 27 Oct 2013 02:48:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4ACC7E0B1E; Sun, 27 Oct 2013 02:48:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4ED1EE0B19 for ; Sun, 27 Oct 2013 02:48:14 +0000 (UTC) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (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 6E2A133EF86 for ; Sun, 27 Oct 2013 02:48:13 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id qd12so9037760ieb.33 for ; Sat, 26 Oct 2013 19:48:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sXSf++wiJ2KuaaqlPWH0XJpoN443IXqNZk2KeS/Zp4w=; b=cfHis1JrAQUiYdkTd2X2oFPScn5vQIjYjnHNaZC6hUQ/WxPWWGQZBlQVHmx/X0wR7r SfLd0L+Q8R6tfXHNTvjtR8BFU5QTTB7rP4UWNqa/Tmy0qxrhsFYsTe5lA6q+fXJMd57O 4ZWB8tzkX+DozUAA6aygeMcxWchGbHP5/YwhmLNxw2UMu7QuSM9H5BiHlohyWU9i1bL2 QHmerPNOYd4Rvm+nnUqblyDTZq/pXUJVimECrvragfJx4sD6LzTVcVgQh3zk9y2POjZC Ppae8zMD9yp0KVAPiMrkp8+H5FNrj5Zrfbx/UKjEiUl1ZGuwZm5INiZv946EuvArj3vz IUWQ== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.50.234.162 with SMTP id uf2mr3902990igc.48.1382842091573; Sat, 26 Oct 2013 19:48:11 -0700 (PDT) Received: by 10.64.139.5 with HTTP; Sat, 26 Oct 2013 19:48:11 -0700 (PDT) In-Reply-To: <20131027021810.GA15388@waltdnes.org> References: <5267CB83.3000306@gentoo.org> <20131027021810.GA15388@waltdnes.org> Date: Sat, 26 Oct 2013 22:48:11 -0400 Message-ID: Subject: Re: [gentoo-user] did python-r1 improve user experience? From: Mike Gilbert To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: ef835890-2566-464f-a808-9a2146a17b1e X-Archives-Hash: 3927697e4fff7166770a4a3c83909a01 On Sat, Oct 26, 2013 at 10:18 PM, Walter Dnes wrote: > On Sat, Oct 26, 2013 at 09:30:57PM -0400, Mike Gilbert wrote > >> The (non-)relationship between eselect python and PYTHON_TARGETS is >> something that would be nice to resolve, but I don't know how to do >> it. PYTHON_SINGLE_TARGET will probably cause problems if/when packages >> start supporting python3 only. > > What I find interesting/annoying is that my make.conf has to have 3 > lines... > > PYTHON_SINGLE_TARGET="python2_7" > PYTHON_TARGETS="python2_7" > USE_PYTHON="2.7" > > ...as if it didn't hear me the first time. How difficult would it be to > set up an eclass to tell portage that... > > if PYTHON_SINGLE_TARGET="pythonX_Y" > > PYTHON_TARGETS defaults to "${PYTHON_SINGLE_TARGET}" > > USE_PYTHON defaults to "${PYTHON_SINGLE_TARGET/_/.}" > > Over-ride the default if explicitly listed. Out of sheer curiousity, > what circumstances are there where ordinary users would need differing > values for these 3 items? > PYTHON_TARGETS and PYTHON_SINGLE_TARGET are used indirectly by python-r1.eclass. However, both are both expanded into use flags and used in dependency calculations before any ebuild/eclass code is invoked. So, we cannot manipulate them in an eclass or ebuild. PYTHON_TARGETS may contain multiple python versions and is used for most python packages in the tree. It allows the same package to be installed for multiple python versions simultaneously. PYTHON_SINGLE_TARGET should only contain one python version; it is used for packages which cannot (easily) be made to support multiple versions of python simultaneously. So we have to pick one. USE_PYTHON is a legacy setting used by the old python.eclass and is not used to control any use flags or dependencies. Ideally, we could default this to PYTHON_TARGETS, but due to the way use-expanded variables work this is not possible. This variable will go away once python.eclass is removed from the portage tree.