From 5c68c3db8f507ca38119aab7bfa5aa74be3ee930 Mon Sep 17 00:00:00 2001 From: Ali Polatel Date: Fri, 20 Jun 2008 18:21:39 +0000 Subject: Set default PYTHON_MODNAME only if the directory site-packages/PN exists. Thanks to ColdWind. --- eclass/distutils.eclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'eclass/distutils.eclass') diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass index f44d89a492af..ce7e0f5b9dbe 100644 --- a/eclass/distutils.eclass +++ b/eclass/distutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.48 2008/05/30 10:22:35 hawking Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.49 2008/06/20 18:21:39 hawking Exp $ # @ECLASS: distutils.eclass # @MAINTAINER: @@ -90,7 +90,10 @@ distutils_src_install() { # @DESCRIPTION: # Generic pyc/pyo cleanup script. This function is exported. distutils_pkg_postrm() { - PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}} + if [[ -z "${PYTHON_MODNAME}" &&\ + -d ${ROOT}/usr/$(get_libdir)/python*/site-packages/${PN} ]]; then + PYTHON_MODNAME=${PN} + fi if has_version ">=dev-lang/python-2.3"; then ebegin "Performing Python Module Cleanup .." -- cgit v1.2.3-65-gdbad