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
commit06df3892be779db00047d6adff1b99807f4b3c1e (patch)
tree1a8190efc9df6b5babd0387953afdf4fe49d2838 /eclass
parentOptimize validate_PYTHON_ABIS(). Add python_convert_shebangs(). Remove incomp... (diff)
downloadgentoo-2-06df3892be779db00047d6adff1b99807f4b3c1e.tar.gz
gentoo-2-06df3892be779db00047d6adff1b99807f4b3c1e.tar.bz2
gentoo-2-06df3892be779db00047d6adff1b99807f4b3c1e.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