Gentoo Archives: gentoo-commits

From: "Rob Cakebread (pythonhead)" <pythonhead@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: python.eclass
Date: Mon, 28 Jul 2008 21:56:43
Message-Id: E1KNahs-0007ih-Lc@stork.gentoo.org
1 pythonhead 08/07/28 21:56:40
2
3 Modified: python.eclass
4 Log:
5 Added get_python_libdir and get_python_sitedir functions bug 232575
6
7 Revision Changes Path
8 1.42 eclass/python.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.42&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.42&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.41&r2=1.42
13
14 Index: python.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v
17 retrieving revision 1.41
18 retrieving revision 1.42
19 diff -u -r1.41 -r1.42
20 --- python.eclass 30 May 2008 09:58:28 -0000 1.41
21 +++ python.eclass 28 Jul 2008 21:56:40 -0000 1.42
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.41 2008/05/30 09:58:28 hawking Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.42 2008/07/28 21:56:40 pythonhead Exp $
27
28 # @ECLASS: python.eclass
29 # @MAINTAINER:
30 @@ -80,6 +80,21 @@
31 __python_version_extract $PYVER_ALL
32 }
33
34 +# @FUNCTION: get_python_libdir
35 +# @DESCRIPTION:
36 +# Run without arguments, returns the python library dir
37 +get_python_libdir() {
38 + python_version
39 + echo "/usr/$(get_libdir)/python${PYVER}"
40 +}
41 +
42 +# @FUNCTION: get_python_sitedir
43 +# @DESCRIPTION:
44 +# Run without arguments, returns the python site-packages dir
45 +get_python_sitedir() {
46 + echo "$(get_python_libdir)/site-packages"
47 +}
48 +
49 # @FUNCTION: python_makesym
50 # @DESCRIPTION:
51 # Run without arguments, it will create the /usr/bin/python symlinks