diff options
author | Ali Polatel <hawking@gentoo.org> | 2008-06-20 18:21:39 +0000 |
---|---|---|
committer | Ali Polatel <hawking@gentoo.org> | 2008-06-20 18:21:39 +0000 |
commit | 5c68c3db8f507ca38119aab7bfa5aa74be3ee930 (patch) | |
tree | c950a8104af2c076fab357ddd2785e1d9a7b82f0 /eclass | |
parent | amd64 stable, bug #227371 (diff) | |
download | gentoo-2-5c68c3db8f507ca38119aab7bfa5aa74be3ee930.tar.gz gentoo-2-5c68c3db8f507ca38119aab7bfa5aa74be3ee930.tar.bz2 gentoo-2-5c68c3db8f507ca38119aab7bfa5aa74be3ee930.zip |
Set default PYTHON_MODNAME only if the directory site-packages/PN exists. Thanks to ColdWind.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils.eclass | 7 |
1 files changed, 5 insertions, 2 deletions
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 .." |