From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NCFZX-00028t-5Z for garchives@archives.gentoo.org; Sun, 22 Nov 2009 16:45:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9665E0733; Sun, 22 Nov 2009 16:45:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8C976E0733 for ; Sun, 22 Nov 2009 16:45:55 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 2A6E8674A2 for ; Sun, 22 Nov 2009 16:45:55 +0000 (UTC) Received: from arfrever by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NCFZS-0003nC-K4 for gentoo-commits@lists.gentoo.org; Sun, 22 Nov 2009 16:45:54 +0000 From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, arfrever@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: python.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: python.eclass X-VCS-Directories: eclass X-VCS-Committer: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis Content-Type: text/plain; charset=utf8 Message-Id: Sender: Arfrever Frehtes Taifersar Arahesis Date: Sun, 22 Nov 2009 16:45:54 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: c1ec8c25-0bcc-4d8a-ba3c-cceca1ae7c06 X-Archives-Hash: b00db63347cad65820f4f7f8596ae253 arfrever 09/11/22 16:45:54 Modified: python.eclass Log: Support --source-dir option of python_execute_function(). Revision Changes Path 1.81 eclass/python.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.ecla= ss?rev=3D1.81&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.ecla= ss?rev=3D1.81&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.ecla= ss?r1=3D1.80&r2=3D1.81 Index: python.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- python.eclass 22 Nov 2009 13:48:16 -0000 1.80 +++ python.eclass 22 Nov 2009 16:45:54 -0000 1.81 @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.80 2009/11/2= 2 13:48:16 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.81 2009/11/2= 2 16:45:54 arfrever Exp $ =20 # @ECLASS: python.eclass # @MAINTAINER: @@ -335,12 +335,12 @@ } =20 # @FUNCTION: python_execute_function -# @USAGE: [--action-message message] [-d|--default-function] [--failure-= message message] [--nonfatal] [-q|--quiet] [-s|--separate-build-dirs] [--= ] [arguments] +# @USAGE: [--action-message message] [-d|--default-function] [--failure-= message message] [--nonfatal] [-q|--quiet] [-s|--separate-build-dirs] [--= source-dir source_directory] [--] [arguments] # @DESCRIPTION: # Execute specified function for each value of PYTHON_ABIS, optionally p= assing additional # arguments. The specified function can use PYTHON_ABI and BUILDDIR vari= ables. python_execute_function() { - local action action_message action_message_template=3D default_function= =3D"0" failure_message failure_message_template=3D function nonfatal=3D"0= " previous_directory previous_directory_stack previous_directory_stack_le= ngth PYTHON_ABI quiet=3D"0" separate_build_dirs=3D"0" + local action action_message action_message_template=3D default_function= =3D"0" failure_message failure_message_template=3D function nonfatal=3D"0= " previous_directory previous_directory_stack previous_directory_stack_le= ngth PYTHON_ABI quiet=3D"0" separate_build_dirs=3D"0" source_dir=3D =20 while (($#)); do case "$1" in @@ -364,6 +364,10 @@ -s|--separate-build-dirs) separate_build_dirs=3D"1" ;; + --source-dir) + source_dir=3D"$2" + shift + ;; --) break ;; @@ -377,6 +381,10 @@ shift done =20 + if [[ -n "${source_dir}" && "${separate_build_dirs}" =3D=3D 0 ]]; then + die "${FUNCNAME}(): '--source-dir' option can be specified only with '= --separate-build-dirs' option" + fi + if [[ "${default_function}" =3D=3D "0" ]]; then if [[ "$#" -eq "0" ]]; then die "${FUNCNAME}(): Missing function name" @@ -466,7 +474,11 @@ fi =20 if [[ "${separate_build_dirs}" =3D=3D "1" ]]; then - export BUILDDIR=3D"${S}-${PYTHON_ABI}" + if [[ -n "${source_dir}" ]]; then + export BUILDDIR=3D"${S}/${source_dir}-${PYTHON_ABI}" + else + export BUILDDIR=3D"${S}-${PYTHON_ABI}" + fi pushd "${BUILDDIR}" > /dev/null || die "pushd failed" else export BUILDDIR=3D"${S}"