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

Diff of /eclass/distutils.eclass

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

Revision 1.48 Revision 1.52
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.48 2008/05/30 10:22:35 hawking Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.52 2008/09/24 16:45:08 hawking Exp $
4 4
5# @ECLASS: distutils.eclass 5# @ECLASS: distutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# <python@gentoo.org> 7# <python@gentoo.org>
8# 8#
69 # - liquidx (14/08/2006) 69 # - liquidx (14/08/2006)
70 pylibdir="$(${python} -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()')" 70 pylibdir="$(${python} -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()')"
71 [ -n "${pylibdir}" ] && dodir "${pylibdir}" 71 [ -n "${pylibdir}" ] && dodir "${pylibdir}"
72 72
73 if has_version ">=dev-lang/python-2.3"; then 73 if has_version ">=dev-lang/python-2.3"; then
74 ${python} setup.py install --root=${D} --no-compile "$@" || die 74 ${python} setup.py install --root="${D}" --no-compile "$@" ||\
75 die "python setup.py install failed"
75 else 76 else
76 ${python} setup.py install --root=${D} "$@" || die 77 ${python} setup.py install --root="${D}" "$@" ||\
78 die "python setup.py install failed"
77 fi 79 fi
78 80
79 DDOCS="CHANGELOG KNOWN_BUGS MAINTAINERS PKG-INFO CONTRIBUTORS TODO NEWS" 81 DDOCS="CHANGELOG KNOWN_BUGS MAINTAINERS PKG-INFO CONTRIBUTORS TODO NEWS"
80 DDOCS="${DDOCS} Change* MANIFEST* README* AUTHORS" 82 DDOCS="${DDOCS} Change* MANIFEST* README* AUTHORS"
81 83
88 90
89# @FUNCTION: distutils_pkg_postrm 91# @FUNCTION: distutils_pkg_postrm
90# @DESCRIPTION: 92# @DESCRIPTION:
91# Generic pyc/pyo cleanup script. This function is exported. 93# Generic pyc/pyo cleanup script. This function is exported.
92distutils_pkg_postrm() { 94distutils_pkg_postrm() {
93 PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}} 95 if [ -z "${PYTHON_MODNAME}" ] && \
96 [ -d ${ROOT}/usr/$(get_libdir)/python*/site-packages/${PN} ]; then
97 PYTHON_MODNAME=${PN}
98 fi
94 99
95 if has_version ">=dev-lang/python-2.3"; then 100 if has_version ">=dev-lang/python-2.3"; then
96 ebegin "Performing Python Module Cleanup .." 101 ebegin "Performing Python Module Cleanup .."
97 if [ -n "${PYTHON_MODNAME}" ]; then 102 if [ -n "${PYTHON_MODNAME}" ]; then
98 for pymod in ${PYTHON_MODNAME}; do 103 for pymod in ${PYTHON_MODNAME}; do
110# @FUNCTION: distutils_pkg_postinst 115# @FUNCTION: distutils_pkg_postinst
111# @DESCRIPTION: 116# @DESCRIPTION:
112# This is a generic optimization, you should override it if your package 117# This is a generic optimization, you should override it if your package
113# installs things in another directory. This function is exported 118# installs things in another directory. This function is exported
114distutils_pkg_postinst() { 119distutils_pkg_postinst() {
115 PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}} 120 if [ -z "${PYTHON_MODNAME}" ] && \
121 [ -d ${ROOT}/usr/$(get_libdir)/python*/site-packages/${PN} ]; then
122 PYTHON_MODNAME=${PN}
123 fi
116 124
117 if has_version ">=dev-lang/python-2.3"; then 125 if has_version ">=dev-lang/python-2.3"; then
118 python_version 126 python_version
119 for pymod in ${PYTHON_MODNAME}; do 127 for pymod in ${PYTHON_MODNAME}; do
120 python_mod_optimize \ 128 python_mod_optimize \

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.20