summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-11 13:38:12 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-11 13:38:12 +0000
commit4bfb60007c6049f18bf062cf3a6f9fb97ef7e049 (patch)
treeba77e4fe93c6c84ab05a1413f93a66b593d3a478 /eclass
parentOptimize validate_PYTHON_ABIS(). Add python_convert_shebangs(). Remove incomp... (diff)
downloadhistorical-4bfb60007c6049f18bf062cf3a6f9fb97ef7e049.tar.gz
historical-4bfb60007c6049f18bf062cf3a6f9fb97ef7e049.tar.bz2
historical-4bfb60007c6049f18bf062cf3a6f9fb97ef7e049.zip
Optimize calls to python_mod_optimize() / python_mod_cleanup() in distutils_pkg_postinst() and distutils_pkg_postrm().
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils.eclass18
1 files changed, 8 insertions, 10 deletions
diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass
index 2f2d7d92942e..6a13e00e07f0 100644
--- a/eclass/distutils.eclass
+++ b/eclass/distutils.eclass
@@ -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.64 2009/09/11 20:03:51 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.65 2009/10/11 13:38:12 arfrever Exp $
# @ECLASS: distutils.eclass
# @MAINTAINER:
@@ -197,9 +197,7 @@ distutils_pkg_postinst() {
fi
if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
- for pymod in ${PYTHON_MODNAME}; do
- python_mod_optimize "${pymod}"
- done
+ python_mod_optimize ${PYTHON_MODNAME}
else
for pymod in ${PYTHON_MODNAME}; do
python_mod_optimize "$(python_get_sitedir)/${pymod}"
@@ -225,17 +223,17 @@ distutils_pkg_postrm() {
fi
if [[ -n "${PYTHON_MODNAME}" ]]; then
- for pymod in ${PYTHON_MODNAME}; do
- if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
- python_mod_cleanup "${pymod}"
- else
+ if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
+ python_mod_cleanup ${PYTHON_MODNAME}
+ else
+ for pymod in ${PYTHON_MODNAME}; do
for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do
if [[ -d "${pylibdir}/site-packages/${pymod}" ]]; then
python_mod_cleanup "${pylibdir#${ROOT}}/site-packages/${pymod}"
fi
done
- fi
- done
+ done
+ fi
else
python_mod_cleanup
fi