diff options
author | Rob Cakebread <pythonhead@gentoo.org> | 2008-07-28 21:56:40 +0000 |
---|---|---|
committer | Rob Cakebread <pythonhead@gentoo.org> | 2008-07-28 21:56:40 +0000 |
commit | b7c80ddaca1dce1e54f4c1c2acfb96a3434dfec1 (patch) | |
tree | d4f49d7586a304b13e57d297140e2b7633fee0c6 /eclass/python.eclass | |
parent | QA: Get rid of deprecated qt_min_version(). Quoting issues. (diff) | |
download | gentoo-2-b7c80ddaca1dce1e54f4c1c2acfb96a3434dfec1.tar.gz gentoo-2-b7c80ddaca1dce1e54f4c1c2acfb96a3434dfec1.tar.bz2 gentoo-2-b7c80ddaca1dce1e54f4c1c2acfb96a3434dfec1.zip |
Added get_python_libdir and get_python_sitedir functions bug 232575
Diffstat (limited to 'eclass/python.eclass')
-rw-r--r-- | eclass/python.eclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index a43932e935d3..53c13afa0ce6 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.41 2008/05/30 09:58:28 hawking Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.42 2008/07/28 21:56:40 pythonhead Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -80,6 +80,21 @@ python_version() { __python_version_extract $PYVER_ALL } +# @FUNCTION: get_python_libdir +# @DESCRIPTION: +# Run without arguments, returns the python library dir +get_python_libdir() { + python_version + echo "/usr/$(get_libdir)/python${PYVER}" +} + +# @FUNCTION: get_python_sitedir +# @DESCRIPTION: +# Run without arguments, returns the python site-packages dir +get_python_sitedir() { + echo "$(get_python_libdir)/site-packages" +} + # @FUNCTION: python_makesym # @DESCRIPTION: # Run without arguments, it will create the /usr/bin/python symlinks |