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 1MkU3Y-0005aV-Co for garchives@archives.gentoo.org; Mon, 07 Sep 2009 02:34:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1872E0904; Mon, 7 Sep 2009 02:34:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B4139E0904 for ; Mon, 7 Sep 2009 02:34:11 +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 4A56B67398 for ; Mon, 7 Sep 2009 02:34:11 +0000 (UTC) Received: from arfrever by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1MkU3W-000259-B1 for gentoo-commits@lists.gentoo.org; Mon, 07 Sep 2009 02:34:10 +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: distutils.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: distutils.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: Mon, 07 Sep 2009 02:34:10 +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: 4c0215dd-5d83-418c-885e-e73c0429be15 X-Archives-Hash: ff876d47f6b48894ac98ffa09814fc99 arfrever 09/09/07 02:34:10 Modified: distutils.eclass Log: Add support for DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES. Create ez_se= tup.py only when it existed. Revision Changes Path 1.61 eclass/distutils.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/distutils.e= class?rev=3D1.61&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/distutils.e= class?rev=3D1.61&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/distutils.e= class?r1=3D1.60&r2=3D1.61 Index: distutils.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/distutils.eclass,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- distutils.eclass 5 Sep 2009 16:45:35 -0000 1.60 +++ distutils.eclass 7 Sep 2009 02:34:10 -0000 1.61 @@ -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/distutils.eclass,v 1.60 2009/0= 9/05 16:45:35 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.61 2009/0= 9/07 02:34:10 arfrever Exp $ =20 # @ECLASS: distutils.eclass # @MAINTAINER: @@ -28,6 +28,10 @@ RDEPEND=3D"${DEPEND}" python=3D"python" =20 +# @ECLASS-VARIABLE: DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES +# @DESCRIPTION: +# Set this to use separate source directories for each enabled version o= f Python. + # @ECLASS-VARIABLE: DISTUTILS_GLOBAL_OPTIONS # @DESCRIPTION: # Global options passed to setup.py. @@ -58,10 +62,18 @@ die "${FUNCNAME}() can be used only in src_prepare() phase" fi =20 - # remove ez_setup stuff to prevent packages - # from installing setuptools on their own - rm -rf ez_setup* - echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py + # Delete ez_setup files to prevent packages from installing + # setuptools on their own. + local ez_setup_py_existence + [[ -f ez_setup.py ]] && ez_setup_py_existence=3D"1" + rm -fr ez_setup* + if [[ "${ez_setup_py_existence}" =3D=3D "1" ]]; then + echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py + fi + + if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then + python_copy_sources + fi } =20 # @FUNCTION: distutils_src_compile @@ -73,11 +85,19 @@ fi =20 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then - building() { - echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "= build-${PYTHON_ABI}" "$@" - "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build= -${PYTHON_ABI}" "$@" - } - python_execute_function building "$@" + if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then + building() { + echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@= " + "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" + } + python_execute_function -s building "$@" + else + building() { + echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b = "build-${PYTHON_ABI}" "$@" + "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "buil= d-${PYTHON_ABI}" "$@" + } + python_execute_function building "$@" + fi else echo ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die = "Building failed" @@ -100,18 +120,33 @@ python_need_rebuild =20 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then - installation() { - # need this for python-2.5 + setuptools in cases where - # a package uses distutils but does not install anything - # in site-packages. (eg. dev-java/java-config-2.x) - # - liquidx (14/08/2006) - pylibdir=3D"$("$(PYTHON)" -c 'from distutils.sysconfig import get_pyt= hon_lib; print(get_python_lib())')" - [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" - - echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "= build-${PYTHON_ABI}" install --root=3D"${D}" --no-compile "$@" - "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build= -${PYTHON_ABI}" install --root=3D"${D}" --no-compile "$@" - } - python_execute_function installation "$@" + if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then + installation() { + # need this for python-2.5 + setuptools in cases where + # a package uses distutils but does not install anything + # in site-packages. (eg. dev-java/java-config-2.x) + # - liquidx (14/08/2006) + pylibdir=3D"$("$(PYTHON)" -c 'from distutils.sysconfig import get_py= thon_lib; print(get_python_lib())')" + [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" + + echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install -= -root=3D"${D}" --no-compile "$@" + "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root= =3D"${D}" --no-compile "$@" + } + python_execute_function -s installation "$@" + else + installation() { + # need this for python-2.5 + setuptools in cases where + # a package uses distutils but does not install anything + # in site-packages. (eg. dev-java/java-config-2.x) + # - liquidx (14/08/2006) + pylibdir=3D"$("$(PYTHON)" -c 'from distutils.sysconfig import get_py= thon_lib; print(get_python_lib())')" + [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" + + echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b = "build-${PYTHON_ABI}" install --root=3D"${D}" --no-compile "$@" + "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "buil= d-${PYTHON_ABI}" install --root=3D"${D}" --no-compile "$@" + } + python_execute_function installation "$@" + fi else # need this for python-2.5 + setuptools in cases where # a package uses distutils but does not install anything