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 BFCD61381F3 for ; Thu, 29 Nov 2012 11:30:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9978921C02E; Thu, 29 Nov 2012 11:30:25 +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 19FF021C02E for ; Thu, 29 Nov 2012 11:30:25 +0000 (UTC) Received: from pomiocik.lan (unknown [81.219.163.24]) (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 44F2A33DAFB; Thu, 29 Nov 2012 11:30:23 +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 5/6] Install the wrapper symlink in _distutils-r1_rename_scripts. Date: Thu, 29 Nov 2012 12:31:33 +0100 Message-Id: <1354188694-7229-6-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1354188694-7229-1-git-send-email-mgorny@gentoo.org> References: <1354188694-7229-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: d84b29f3-fa04-4286-aecb-a2fb43900712 X-Archives-Hash: f657be36621eb617b16dffd0d7090d66 This is cleaner than delaying it to install_all(). --- gx86/eclass/distutils-r1.eclass | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass index fffa800..c21ab30 100644 --- a/gx86/eclass/distutils-r1.eclass +++ b/gx86/eclass/distutils-r1.eclass @@ -268,8 +268,11 @@ _distutils-r1_rename_scripts() { debug-print "${FUNCNAME}: matching shebang: $(head -n 1 "${f}")" local newf=${f}-${EPYTHON} - debug-print "${FUNCNAME}: renamed to ${newf#${D}/}" + debug-print "${FUNCNAME}: renaming to ${newf#${D}/}" mv "${f}" "${newf}" || die + + debug-print "${FUNCNAME}: installing wrapper at ${f#${D}/}" + _python_ln_rel "${path}"/usr/bin/python-exec "${f}" || die fi done < <(find "${path}" -type f -executable -print0) } @@ -309,9 +312,7 @@ distutils-r1_python_install() { # @FUNCTION: distutils-r1_python_install_all # @DESCRIPTION: -# The default python_install_all(). It symlinks wrappers -# for the implementation-suffixed executables and installs -# documentation. +# The default python_install_all(). It installs the documentation. distutils-r1_python_install_all() { debug-print-function ${FUNCNAME} "${@}" @@ -331,20 +332,6 @@ distutils-r1_python_install_all() { if declare -p HTML_DOCS &>/dev/null; then dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" fi - - # note: keep in sync with ...rename_scripts() - # also, we assume that each script is installed for all impls - local EPYTHON - python_export_best EPYTHON - - local f - while IFS= read -r -d '' f; do - debug-print "${FUNCNAME}: found executable at ${f#${D}/}" - - local wrapf=${f%-${EPYTHON}} - - _python_ln_rel "${ED}"/usr/bin/python-exec "${wrapf}" || die - done < <(find "${D}" -type f -executable -name "*-${EPYTHON}" -print0) } # @FUNCTION: distutils-r1_run_phase -- 1.8.0