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

Diff of /eclass/python.eclass

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

Revision 1.19 Revision 1.24
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.19 2005/07/06 20:20:04 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.24 2006/06/10 16:19:54 swegener 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.
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
21 21
22INHERITED="$INHERITED $ECLASS"
23 22
23if [[ -n "${NEED_PYTHON}" ]] ; then
24 DEPEND=">=dev-lang/python-${NEED_PYTHON}"
25 RDEPEND="${DEPEND}"
26fi
24 27
25__python_eclass_test() { 28__python_eclass_test() {
26 __python_version_extract 2.3 29 __python_version_extract 2.3
27 echo -n "2.3 -> PYVER: $PYVER PYVER_MAJOR: $PYVER_MAJOR" 30 echo -n "2.3 -> PYVER: $PYVER PYVER_MAJOR: $PYVER_MAJOR"
28 echo " PYVER_MINOR: $PYVER_MINOR PYVER_MICRO: $PYVER_MICRO" 31 echo " PYVER_MINOR: $PYVER_MINOR PYVER_MICRO: $PYVER_MICRO"
64__python_version_extract() { 67__python_version_extract() {
65 verstr=$1 68 verstr=$1
66 export PYVER_MAJOR=${verstr:0:1} 69 export PYVER_MAJOR=${verstr:0:1}
67 export PYVER_MINOR=${verstr:2:1} 70 export PYVER_MINOR=${verstr:2:1}
68 export PYVER_MICRO=${verstr:4} 71 export PYVER_MICRO=${verstr:4}
69 export PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" 72 export PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
70} 73}
71 74
72python_version() { 75python_version() {
73 local tmpstr 76 local tmpstr
74 python=${python:-/usr/bin/python} 77 python=${python:-/usr/bin/python}

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20