From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-python+bounces-421-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C9534198005 for <garchives@archives.gentoo.org>; Sun, 17 Mar 2013 22:33:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F797E027D; Sun, 17 Mar 2013 22:33:11 +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 CAB28E027D for <gentoo-python@lists.gentoo.org>; Sun, 17 Mar 2013 22:33:10 +0000 (UTC) Received: from pomiocik.lan (87-205-48-218.adsl.inetia.pl [87.205.48.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 79D8233D9E7; Sun, 17 Mar 2013 22:33:08 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> Subject: [gentoo-python] [PATCH python-r1 1/2] Reuse multibuild.eclass in python_export_best(). Date: Sun, 17 Mar 2013 23:33:49 +0100 Message-Id: <1363559630-17431-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.5 Precedence: bulk List-Post: <mailto:gentoo-python@lists.gentoo.org> List-Help: <mailto:gentoo-python+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-python+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-python+subscribe@lists.gentoo.org> List-Id: Discussions centering around the Python ecosystem in Gentoo Linux <gentoo-python.gentoo.org> X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org X-Archives-Salt: 7c4d0375-80a1-414c-8555-dbd6f7c545a3 X-Archives-Hash: 123ca98a01e751bc21d7e057d21669ca --- 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=${impl} - fi - done + local best MULTIBUILD_VARIANTS + _python_obtain_impls - [[ ${best+1} ]] || die "python_export_best(): no implementation found!" + _python_set_best() { + best=${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