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

Diff of /eclass/python.eclass

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

Revision 1.39 Revision 1.40
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/python.eclass,v 1.39 2008/05/29 21:19:19 hawking Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.40 2008/05/29 22:03:59 hawking Exp $
4 4
5# @ECLASS: python.eclass 5# @ECLASS: python.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# python@gentoo.org 7# python@gentoo.org
8# 8#
176# Options passed to this function are passed to compileall.py 176# Options passed to this function are passed to compileall.py
177# 177#
178# Example: 178# Example:
179# python_mod_optimize /usr/share/codegen 179# python_mod_optimize /usr/share/codegen
180python_mod_optimize() { 180python_mod_optimize() {
181 local mydirs myfiles myroot myopts path 181 local mydirs myfiles myroot myopts
182 182
183 # Check if phase is pkg_postinst() 183 # Check if phase is pkg_postinst()
184 [[ ${EBUILD_PHASE} != postinst ]] &&\ 184 [[ ${EBUILD_PHASE} != postinst ]] &&\
185 die "${FUNCNAME} should only be run in pkg_postinst()" 185 die "${FUNCNAME} should only be run in pkg_postinst()"
186 186
200 ;; 200 ;;
201 -*) 201 -*)
202 ewarn "${FUNCNAME}: Ignoring compile option $1" 202 ewarn "${FUNCNAME}: Ignoring compile option $1"
203 ;; 203 ;;
204 *) 204 *)
205 for path in $@; do
206 [ ! -e "${myroot}/${path}" ] && ewarn "${myroot}/${path} doesn't exist!" 205 [ ! -e "${myroot}/${1}" ] && ewarn "${myroot}/${1} doesn't exist!"
207 [ -d "${myroot}/${path#/}" ] && mydirs="${mydirs} ${myroot}/${path#/}" 206 [ -d "${myroot}/${1#/}" ] && mydirs="${mydirs} ${myroot}/${1#/}"
208 # Files are passed to python_mod_compile which is ROOT-aware 207 # Files are passed to python_mod_compile which is ROOT-aware
209 [ -f "${myroot}/${path}" ] && myfiles="${myfiles} ${path}" 208 [ -f "${myroot}/${1}" ] && myfiles="${myfiles} ${1}"
210 done
211 ;; 209 ;;
212 esac 210 esac
213 shift 211 shift
214 done 212 done
215 213

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20