| 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/distutils.eclass,v 1.54 2008/10/28 21:29:28 hawking Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.55 2009/02/18 14:43:31 pva Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: distutils.eclass |
5 | # @ECLASS: distutils.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # <python@gentoo.org> |
7 | # <python@gentoo.org> |
| 8 | # |
8 | # |
| … | |
… | |
| 14 | # the Gentoo Linux system. |
14 | # the Gentoo Linux system. |
| 15 | # |
15 | # |
| 16 | # It inherits python, multilib, and eutils |
16 | # It inherits python, multilib, and eutils |
| 17 | |
17 | |
| 18 | inherit python multilib eutils |
18 | inherit python multilib eutils |
|
|
19 | |
|
|
20 | case "${EAPI:-0}" in |
|
|
21 | 0|1) |
|
|
22 | EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm |
|
|
23 | ;; |
|
|
24 | *) |
|
|
25 | EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm |
|
|
26 | ;; |
|
|
27 | esac |
| 19 | |
28 | |
| 20 | # @ECLASS-VARIABLE: PYTHON_SLOT_VERSION |
29 | # @ECLASS-VARIABLE: PYTHON_SLOT_VERSION |
| 21 | # @DESCRIPTION: |
30 | # @DESCRIPTION: |
| 22 | # This helps make it possible to add extensions to python slots. |
31 | # This helps make it possible to add extensions to python slots. |
| 23 | # Normally only a -py21- ebuild would set PYTHON_SLOT_VERSION. |
32 | # Normally only a -py21- ebuild would set PYTHON_SLOT_VERSION. |
| … | |
… | |
| 41 | # The distutils src_unpack function, this function is exported |
50 | # The distutils src_unpack function, this function is exported |
| 42 | distutils_src_unpack() { |
51 | distutils_src_unpack() { |
| 43 | unpack ${A} |
52 | unpack ${A} |
| 44 | cd "${S}" |
53 | cd "${S}" |
| 45 | |
54 | |
|
|
55 | has ${EAPI:-0} 0 1 && distutils_src_prepare |
|
|
56 | } |
|
|
57 | |
|
|
58 | # @FUNCTION: distutils_src_prepare |
|
|
59 | # @DESCRIPTION: |
|
|
60 | # The distutils src_prepare function, this function is exported |
|
|
61 | distutils_src_prepare() { |
| 46 | # remove ez_setup stuff to prevent packages |
62 | # remove ez_setup stuff to prevent packages |
| 47 | # from installing setuptools on their own |
63 | # from installing setuptools on their own |
| 48 | rm -rf ez_setup* |
64 | rm -rf ez_setup* |
| 49 | echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py |
65 | echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py |
| 50 | } |
66 | } |
| … | |
… | |
| 157 | # Checks for if tkinter support is compiled into python |
173 | # Checks for if tkinter support is compiled into python |
| 158 | distutils_python_tkinter() { |
174 | distutils_python_tkinter() { |
| 159 | python_tkinter_exists |
175 | python_tkinter_exists |
| 160 | } |
176 | } |
| 161 | |
177 | |
| 162 | EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm |
|
|