From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-python+bounces-398-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 1CFC2198005
	for <garchives@archives.gentoo.org>; Thu, 21 Feb 2013 22:10:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A6082E0369;
	Thu, 21 Feb 2013 22:10:03 +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 438E5E02DF
	for <gentoo-python@lists.gentoo.org>; Thu, 21 Feb 2013 22:10:03 +0000 (UTC)
Received: from pomiocik.lan (unknown [213.195.173.220])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: mgorny)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 388B533E0E0;
	Thu, 21 Feb 2013 22:10:00 +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 4/5] Use python_parallel_foreach_impl() in distutils-r1.
Date: Thu, 21 Feb 2013 23:10:04 +0100
Message-Id: <1361484605-13363-4-git-send-email-mgorny@gentoo.org>
X-Mailer: git-send-email 1.8.1.2
In-Reply-To: <20130221230724.15b66f86@pomiocik.lan>
References: <20130221230724.15b66f86@pomiocik.lan>
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: 9ffd23da-058b-4b91-87e6-911b0c745cd4
X-Archives-Hash: a365372d0577be50a3151c6cc25363c1

---
 gx86/eclass/distutils-r1.eclass | 53 ++++++-----------------------------------
 1 file changed, 7 insertions(+), 46 deletions(-)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index adb5d42..42b48bc 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -525,16 +525,7 @@ distutils-r1_run_phase() {
 
 	mkdir -p "${TMPDIR}" || die
 
-	if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]]
-	then
-		"${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
-	else
-		(
-			multijob_child_init
-			"${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
-		) &
-		multijob_post_fork
-	fi
+	"${@}"
 
 	if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
 	then
@@ -566,39 +557,6 @@ _distutils-r1_run_common_phase() {
 	"${@}"
 }
 
-# @FUNCTION: _distutils-r1_multijob_init
-# @INTERNAL
-# @DESCRIPTION:
-# Init multijob, taking the job-count from ${DISTUTILS_JOBS}.
-_distutils-r1_multijob_init() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
-	then
-		local opts
-		if [[ ${DISTUTILS_JOBS} ]]; then
-			opts=-j${DISTUTILS_JOBS}
-		else
-			opts=${MAKEOPTS}
-		fi
-
-		multijob_init "${opts}"
-	fi
-}
-
-# @FUNCTION: _distutils-r1_multijob_finish
-# @INTERNAL
-# @DESCRIPTION:
-# Finish multijob if used.
-_distutils-r1_multijob_finish() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	if [[ ! ${DISTUTILS_NO_PARALLEL_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
-	then
-		multijob_finish
-	fi
-}
-
 # @FUNCTION: _distutils-r1_run_foreach_impl
 # @INTERNAL
 # @DESCRIPTION:
@@ -610,9 +568,12 @@ _distutils-r1_run_foreach_impl() {
 	set -- distutils-r1_run_phase "${@}"
 
 	if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
-		_distutils-r1_multijob_init
-		python_foreach_impl "${@}"
-		_distutils-r1_multijob_finish
+		if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]]
+		then
+			python_foreach_impl "${@}"
+		else
+			python_parallel_foreach_impl "${@}"
+		fi
 	else
 		if [[ ! ${EPYTHON} ]]; then
 			die "EPYTHON unset, python-single-r1_pkg_setup not called?!"
-- 
1.8.1.2