diff options
author | Ali Polatel <hawking@gentoo.org> | 2008-06-24 13:40:50 +0000 |
---|---|---|
committer | Ali Polatel <hawking@gentoo.org> | 2008-06-24 13:40:50 +0000 |
commit | 69ace0c9991d4f2c69940cd95e520ed8ccf3b499 (patch) | |
tree | aa95897404ecc036c6084d2e0637cd231ec30843 /eclass/distutils.eclass | |
parent | Stable on amd64; bug #229083 (diff) | |
download | historical-69ace0c9991d4f2c69940cd95e520ed8ccf3b499.tar.gz historical-69ace0c9991d4f2c69940cd95e520ed8ccf3b499.tar.bz2 historical-69ace0c9991d4f2c69940cd95e520ed8ccf3b499.zip |
Set default PYTHON_MODNAME only if the directory site-packages/PN exists for distutils_pkg_postinst.
Diffstat (limited to 'eclass/distutils.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 ce7e0f5b9dbe..8ce9aafd67b3 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.49 2008/06/20 18:21:39 hawking Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.50 2008/06/24 13:40:50 hawking Exp $ # @ECLASS: distutils.eclass # @MAINTAINER: @@ -115,7 +115,10 @@ distutils_pkg_postrm() { # This is a generic optimization, you should override it if your package # installs things in another directory. This function is exported distutils_pkg_postinst() { - 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 python_version |