summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-02-18 14:43:31 +0000
committerPeter Volkov <pva@gentoo.org>2009-02-18 14:43:31 +0000
commit473cd291c96346e7ad3adb74de917f67c9f8dcd9 (patch)
tree40d950642ceedafa7a2bb1c2ecd1770d67c84d4c /eclass/distutils.eclass
parentremanifesting (diff)
downloadgentoo-2-473cd291c96346e7ad3adb74de917f67c9f8dcd9.tar.gz
gentoo-2-473cd291c96346e7ad3adb74de917f67c9f8dcd9.tar.bz2
gentoo-2-473cd291c96346e7ad3adb74de917f67c9f8dcd9.zip
Made eclass EAPI=2 aware, bug #255989.
Diffstat (limited to 'eclass/distutils.eclass')
-rw-r--r--eclass/distutils.eclass19
1 files changed, 17 insertions, 2 deletions
diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass
index 121f56913de2..8d9848574ba7 100644
--- a/eclass/distutils.eclass
+++ b/eclass/distutils.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/distutils.eclass,v 1.54 2008/10/28 21:29:28 hawking Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.55 2009/02/18 14:43:31 pva Exp $
# @ECLASS: distutils.eclass
# @MAINTAINER:
@@ -17,6 +17,15 @@
inherit python multilib eutils
+case "${EAPI:-0}" in
+ 0|1)
+ EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
+ ;;
+ *)
+ EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm
+ ;;
+esac
+
# @ECLASS-VARIABLE: PYTHON_SLOT_VERSION
# @DESCRIPTION:
# This helps make it possible to add extensions to python slots.
@@ -43,6 +52,13 @@ distutils_src_unpack() {
unpack ${A}
cd "${S}"
+ has ${EAPI:-0} 0 1 && distutils_src_prepare
+}
+
+# @FUNCTION: distutils_src_prepare
+# @DESCRIPTION:
+# The distutils src_prepare function, this function is exported
+distutils_src_prepare() {
# remove ez_setup stuff to prevent packages
# from installing setuptools on their own
rm -rf ez_setup*
@@ -159,4 +175,3 @@ distutils_python_tkinter() {
python_tkinter_exists
}
-EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm