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 B97F4198005 for ; Sun, 24 Feb 2013 12:47:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BDA4AE058A; Sun, 24 Feb 2013 12:47:37 +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 582E4E058A for ; Sun, 24 Feb 2013 12:47:37 +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 7347933DC87; Sun, 24 Feb 2013 12:47:35 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-python] [PATCH distutils-r1 1/4] In-source builds: make BUILD_DIR point to the 'build' subdir. Date: Sun, 24 Feb 2013 13:47:44 +0100 Message-Id: <1361710067-8869-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <20130224134551.63bd9791@pomiocik.lan> References: <20130224134551.63bd9791@pomiocik.lan> 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 X-Archives-Salt: 6e1ef142-f433-4cfb-bda1-5a5402d83c22 X-Archives-Hash: 6080d851471cc0aaeda5fe65cfe326e7 Currently BUILD_DIR points to the 'top' source directory. It is not really suitable for adjusting the build paths since 'lib', 'test', 'scripts' sub-directories would likely collide. The 'safest' way of making BUILD_DIR usable for build locations would be to make it point to the 'build' subdirectory. That subdirectory is used by default for builds and therefore it is very unlikely to cause any collisions. Note that this will actually break a few ebuilds relying on BUILD_DIR pointing to the top of source tree. We will need to fix those but that will be straightforward. --- gx86/eclass/distutils-r1.eclass | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass index df46d59..7a1551b 100644 --- a/gx86/eclass/distutils-r1.eclass +++ b/gx86/eclass/distutils-r1.eclass @@ -285,11 +285,6 @@ distutils_install_for_testing() { # 5) 'install' needs to go before 'bdist_egg' or the latter would # re-set install paths. - if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then - # use 'build' subdirectory to reduce the risk of collisions - local BUILD_DIR=${BUILD_DIR}/build - fi - TEST_DIR=${BUILD_DIR}/test local bindir=${TEST_DIR}/scripts local libdir=${TEST_DIR}/lib @@ -540,8 +535,9 @@ distutils-r1_python_install_all() { # directory, with BUILD_DIR pointing at the build directory # and PYTHONPATH having an entry for the module build directory. # -# If in-source builds are used, the command is executed in the BUILD_DIR -# (the directory holding per-implementation copy of sources). +# If in-source builds are used, the command is executed in the directory +# holding the per-implementation copy of sources. BUILD_DIR points +# to the 'build' subdirectory. distutils-r1_run_phase() { debug-print-function ${FUNCNAME} "${@}" @@ -549,6 +545,7 @@ distutils-r1_run_phase() { if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then pushd "${BUILD_DIR}" >/dev/null || die fi + local BUILD_DIR=${BUILD_DIR}/build else local PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}" export PYTHONPATH -- 1.8.1.4