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 683F8198005 for ; Sun, 17 Mar 2013 23:36:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF033E055C; Sun, 17 Mar 2013 23:36:33 +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 75D7AE055C for ; Sun, 17 Mar 2013 23:36:33 +0000 (UTC) Received: from mail-ia0-x22d.google.com (mail-ia0-x22d.google.com [IPv6:2607:f8b0:4001:c02::22d]) (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 87D3C33D77F for ; Sun, 17 Mar 2013 23:36:32 +0000 (UTC) Received: by mail-ia0-f173.google.com with SMTP id h37so4777426iak.32 for ; Sun, 17 Mar 2013 16:36:31 -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 X-Received: by 10.50.217.167 with SMTP id oz7mr5040205igc.26.1363563391034; Sun, 17 Mar 2013 16:36:31 -0700 (PDT) Received: by 10.64.102.66 with HTTP; Sun, 17 Mar 2013 16:36:30 -0700 (PDT) In-Reply-To: <1363559630-17431-1-git-send-email-mgorny@gentoo.org> References: <1363559630-17431-1-git-send-email-mgorny@gentoo.org> Date: Sun, 17 Mar 2013 19:36:30 -0400 Message-ID: Subject: [gentoo-python] Re: [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best(). From: Mike Gilbert To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-python@lists.gentoo.org, python@gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 715a5648-ef8d-4de7-b2e6-475491604141 X-Archives-Hash: 42d0c8a072b5c043e1834e56c2fbd622 On Sun, Mar 17, 2013 at 6:33 PM, Micha=C5=82 G=C3=B3rny = wrote: > --- > gx86/eclass/python-r1.eclass | 22 ++++++++-------------- > 1 file changed, 8 insertions(+), 14 deletions(-) > > diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass > index 12e3baa..99bd240 100644 > --- a/gx86/eclass/python-r1.eclass > +++ b/gx86/eclass/python-r1.eclass > @@ -661,24 +661,18 @@ python_parallel_foreach_impl() { > python_export_best() { > debug-print-function ${FUNCNAME} "${@}" > > - _python_validate_useflags > - > [[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON > > - local impl best > - for impl in "${_PYTHON_ALL_IMPLS[@]}"; do > - if has "${impl}" "${PYTHON_COMPAT[@]}" \ > - && _python_impl_supported "${impl}" \ > - && use "python_targets_${impl}" > - then > - best=3D${impl} > - fi > - done > + local best MULTIBUILD_VARIANTS > + _python_obtain_impls > > - [[ ${best+1} ]] || die "python_export_best(): no implementation f= ound!" > + _python_set_best() { > + best=3D${MULTIBUILD_VARIANT} > + } > + multibuild_for_best_variant _python_set_best > > - debug-print "${FUNCNAME}: Best implementation is: ${impl}" > - python_export "${impl}" "${@}" > + debug-print "${FUNCNAME}: Best implementation is: ${best}" > + python_export "${best}" "${@}" > } > > # @FUNCTION: python_replicate_script > -- > 1.8.1.5 > Seems reasonable.