/[gentoo-x86]/eclass/distutils.eclass
Gentoo

Diff of /eclass/distutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.46 Revision 1.47
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.46 2008/02/28 20:20:32 dev-zero Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.47 2008/05/29 15:24:51 hawking Exp $
4 4
5# @ECLASS: distutils.eclass 5# @ECLASS: distutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Alastair Tse <liquidx@gentoo.org> 7# Alastair Tse <liquidx@gentoo.org>
8# 8#
112# This is a generic optimization, you should override it if your package 112# This is a generic optimization, you should override it if your package
113# installs things in another directory. This function is exported 113# installs things in another directory. This function is exported
114distutils_pkg_postinst() { 114distutils_pkg_postinst() {
115 PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}} 115 PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}}
116 116
117 # strip trailing slash
118 myroot="${ROOT%/}"
119
120 if has_version ">=dev-lang/python-2.3"; then 117 if has_version ">=dev-lang/python-2.3"; then
121 python_version 118 python_version
122 for pymod in ${PYTHON_MODNAME}; do 119 for pymod in ${PYTHON_MODNAME}; do
120 python_mod_optimize \
123 if [ -d "${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then 121 /usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
124 python_mod_optimize ${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
125 fi
126 done 122 done
127 fi 123 fi
128} 124}
129 125
130# @FUNCTION: distutils_python_version 126# @FUNCTION: distutils_python_version

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.20