summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Cakebread <pythonhead@gentoo.org>2008-07-28 21:56:40 +0000
committerRob Cakebread <pythonhead@gentoo.org>2008-07-28 21:56:40 +0000
commitf856cf51c79e9f47d12ef8ea85c7580ffd447c17 (patch)
tree75424989ebc7385cbbb2ef67966b106c730bc07c /eclass/python.eclass
parentQA: Get rid of deprecated qt_min_version(). Quoting issues. (diff)
downloadhistorical-f856cf51c79e9f47d12ef8ea85c7580ffd447c17.tar.gz
historical-f856cf51c79e9f47d12ef8ea85c7580ffd447c17.tar.bz2
historical-f856cf51c79e9f47d12ef8ea85c7580ffd447c17.zip
Added get_python_libdir and get_python_sitedir functions bug 232575
Diffstat (limited to 'eclass/python.eclass')
-rw-r--r--eclass/python.eclass17
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