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

Diff of /eclass/python.eclass

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

Revision 1.31 Revision 1.32
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.31 2007/02/03 02:10:23 kloeri Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.32 2007/05/06 22:11:12 kloeri Exp $
4# 4#
5# Author: Alastair Tse <liquidx@gentoo.org> 5# Author: Alastair Tse <liquidx@gentoo.org>
6# 6#
7# A Utility Eclass that should be inherited by anything that deals with 7# A Utility Eclass that should be inherited by anything that deals with
8# Python or Python modules. 8# Python or Python modules.
15# python_mod_optimize() - Generates .pyc/.pyo precompiled scripts 15# python_mod_optimize() - Generates .pyc/.pyo precompiled scripts
16# python_mod_cleanup() - Goes through /usr/lib*/python* to remove 16# python_mod_cleanup() - Goes through /usr/lib*/python* to remove
17# orphaned *.pyc *.pyo 17# orphaned *.pyc *.pyo
18# python_makesym() - Makes /usr/bin/python symlinks 18# python_makesym() - Makes /usr/bin/python symlinks
19 19
20inherit alternatives 20inherit alternatives multilib
21 21
22 22
23if [[ -n "${NEED_PYTHON}" ]] ; then 23if [[ -n "${NEED_PYTHON}" ]] ; then
24 DEPEND=">=dev-lang/python-${NEED_PYTHON}" 24 DEPEND=">=dev-lang/python-${NEED_PYTHON}"
25 RDEPEND="${DEPEND}" 25 RDEPEND="${DEPEND}"
183 else 183 else
184 compileopts="-q" 184 compileopts="-q"
185 fi 185 fi
186 186
187 ebegin "Byte compiling python modules for python-${PYVER} .." 187 ebegin "Byte compiling python modules for python-${PYVER} .."
188 python${PYVER} ${myroot}/usr/lib/python${PYVER}/compileall.py ${compileopts} $@ 188 python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@
189 python${PYVER} -O ${myroot}/usr/lib/python${PYVER}/compileall.py ${compileopts} $@ 189 python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@
190 eend $? 190 eend $?
191} 191}
192 192
193# 193#
194# name: python_mod_cleanup 194# name: python_mod_cleanup

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20