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

Diff of /eclass/python.eclass

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

Revision 1.41 Revision 1.43
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.41 2008/05/30 09:58:28 hawking Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.43 2008/08/01 22:22:21 pythonhead 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#
76 local tmpstr 76 local tmpstr
77 python=${python:-/usr/bin/python} 77 python=${python:-/usr/bin/python}
78 tmpstr="$(${python} -V 2>&1 )" 78 tmpstr="$(${python} -V 2>&1 )"
79 export PYVER_ALL="${tmpstr#Python }" 79 export PYVER_ALL="${tmpstr#Python }"
80 __python_version_extract $PYVER_ALL 80 __python_version_extract $PYVER_ALL
81}
82
83# @FUNCTION: python_get_libdir
84# @DESCRIPTION:
85# Run without arguments, returns the python library dir
86python_get_libdir() {
87 python_version
88 echo "/usr/$(get_libdir)/python${PYVER}"
89}
90
91# @FUNCTION: python_get_sitedir
92# @DESCRIPTION:
93# Run without arguments, returns the python site-packages dir
94python_get_sitedir() {
95 echo "$(python_get_libdir)/site-packages"
81} 96}
82 97
83# @FUNCTION: python_makesym 98# @FUNCTION: python_makesym
84# @DESCRIPTION: 99# @DESCRIPTION:
85# Run without arguments, it will create the /usr/bin/python symlinks 100# Run without arguments, it will create the /usr/bin/python symlinks

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.20