summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAli Polatel <hawking@gentoo.org>2008-06-24 13:40:50 +0000
committerAli Polatel <hawking@gentoo.org>2008-06-24 13:40:50 +0000
commitbd26771d0eb9e1a69ffe7a3d5d73f1ab928846b0 (patch)
tree2aa2caae90ad1c55ce5be692df1f1a66623e2f99 /eclass
parentStable on amd64; bug #229083 (diff)
downloadgentoo-2-bd26771d0eb9e1a69ffe7a3d5d73f1ab928846b0.tar.gz
gentoo-2-bd26771d0eb9e1a69ffe7a3d5d73f1ab928846b0.tar.bz2
gentoo-2-bd26771d0eb9e1a69ffe7a3d5d73f1ab928846b0.zip
Set default PYTHON_MODNAME only if the directory site-packages/PN exists for distutils_pkg_postinst.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils.eclass7
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