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 872551381F3 for ; Fri, 13 Sep 2013 18:58:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DC52E0AD2; Fri, 13 Sep 2013 18:58:38 +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 A386BE0AD2 for ; Fri, 13 Sep 2013 18:58:37 +0000 (UTC) Received: from pomiot.lan (host-81.219.110.26.devs.futuro.pl [81.219.110.26]) (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 6BD8D33ECB6; Fri, 13 Sep 2013 18:58: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 6/8] _distutils-r1_wrap_scripts(): do not pass root path explicitly. Date: Fri, 13 Sep 2013 20:58:47 +0200 Message-Id: <1379098729-2801-7-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1379098729-2801-1-git-send-email-mgorny@gentoo.org> References: <1379098729-2801-1-git-send-email-mgorny@gentoo.org> 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: 6a9f5733-3768-4f7e-9c18-6ac08f2d278f X-Archives-Hash: 8e207f08381d9df1e516e1f5aed96dbf --- gx86/eclass/distutils-r1.eclass | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass index 5fcb55e..7b119bf 100644 --- a/gx86/eclass/distutils-r1.eclass +++ b/gx86/eclass/distutils-r1.eclass @@ -410,7 +410,6 @@ distutils-r1_python_test() { } # @FUNCTION: _distutils-r1_wrap_scripts -# @USAGE: # @INTERNAL # @DESCRIPTION: # Moves and wraps all Python scripts installed to PYTHON_SCRIPTDIR @@ -418,14 +417,11 @@ distutils-r1_python_test() { _distutils-r1_wrap_scripts() { debug-print-function ${FUNCNAME} "${@}" - local path=${1} - [[ ${path} ]] || die "${FUNCNAME}: no path given" - - mkdir -p "${path}/usr/bin" || die + mkdir -p "${ED}/usr/bin" || die local f while IFS= read -r -d '' f; do local basename=${f##*/} - debug-print "${FUNCNAME}: found executable at ${f#${path}/}" + debug-print "${FUNCNAME}: found executable at ${f#${D%/}}" local shebang read -r shebang < "${f}" @@ -437,15 +433,15 @@ _distutils-r1_wrap_scripts() { mv "${f}" "${ED%/}/usr/bin/${newfn}" || die debug-print "${FUNCNAME}: installing wrapper at /usr/bin/${basename}" - _python_ln_rel "${path}${EPREFIX}"/usr/bin/python-exec \ - "${path}${EPREFIX}/usr/bin/${basename}" || die + _python_ln_rel "${D}${EPREFIX}"/usr/bin/python-exec \ + "${ED%/}/usr/bin/${basename}" || die else debug-print "${FUNCNAME}: non-matching shebang: ${shebang}" debug-print "${FUNCNAME}: moving to /usr/bin/${basename}" mv "${f}" "${ED%/}/usr/bin/${basename}" || die fi - done < <(find "${path}/${PYTHON_SCRIPTDIR}" -type f -print0) + done < <(find "${D%/}/${PYTHON_SCRIPTDIR}" -type f -print0) } # @FUNCTION: distutils-r1_python_install @@ -491,7 +487,7 @@ distutils-r1_python_install() { fi if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then - _distutils-r1_wrap_scripts "${D}" + _distutils-r1_wrap_scripts fi } -- 1.8.3.2