summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-01 02:53:05 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-01 02:53:05 +0000
commit9a2b24be80d720d192b258540e55d0d7a84ac0c2 (patch)
treefb4b274ff00e8b999846af4a44d7d8e1bbea0379 /dev-python/myghty
parentSet SUPPORT_PYTHON_ABIS. Delete "test" USE flag. (diff)
downloadgentoo-2-9a2b24be80d720d192b258540e55d0d7a84ac0c2.tar.gz
gentoo-2-9a2b24be80d720d192b258540e55d0d7a84ac0c2.tar.bz2
gentoo-2-9a2b24be80d720d192b258540e55d0d7a84ac0c2.zip
Support Python 2.6 (bug #282184). Set SUPPORT_PYTHON_ABIS.
(Portage version: 14469-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/myghty')
-rw-r--r--dev-python/myghty/ChangeLog11
-rw-r--r--dev-python/myghty/files/myghty-1.1-python-2.6.patch30
-rw-r--r--dev-python/myghty/myghty-1.1-r1.ebuild (renamed from dev-python/myghty/myghty-1.1.ebuild)42
3 files changed, 65 insertions, 18 deletions
diff --git a/dev-python/myghty/ChangeLog b/dev-python/myghty/ChangeLog
index a44e04bcf6d9..af1d8be3d396 100644
--- a/dev-python/myghty/ChangeLog
+++ b/dev-python/myghty/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/myghty
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/myghty/ChangeLog,v 1.2 2007/07/04 17:47:36 pythonhead Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/myghty/ChangeLog,v 1.3 2009/10/01 02:53:03 arfrever Exp $
+
+*myghty-1.1-r1 (01 Oct 2009)
+
+ 01 Oct 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ -myghty-1.1.ebuild, +myghty-1.1-r1.ebuild,
+ +files/myghty-1.1-python-2.6.patch:
+ Support Python 2.6 (bug #282184). Set SUPPORT_PYTHON_ABIS.
04 Jul 2007; Rob Cakebread <pythonhead@gentoo.org> myghty-1.1.ebuild:
Removed setuptools sed. bug# 184039
diff --git a/dev-python/myghty/files/myghty-1.1-python-2.6.patch b/dev-python/myghty/files/myghty-1.1-python-2.6.patch
new file mode 100644
index 000000000000..b6b49f2739be
--- /dev/null
+++ b/dev-python/myghty/files/myghty-1.1-python-2.6.patch
@@ -0,0 +1,30 @@
+Index: lib/myghty/importer.py
+===================================================================
+--- lib/myghty/importer.py (revision 2153)
++++ lib/myghty/importer.py (revision 2155)
+@@ -47,11 +47,20 @@
+
+ # override __import__ to look in our own local module dict first
+ builtin_importer = __builtin__.__import__
+-def import_module(name, globals = None, locals = None, fromlist = None):
+- try:
+- return modules[name].module
+- except KeyError:
+- return builtin_importer(name, globals, locals, fromlist)
++if sys.version_info >= (2, 5):
++ def import_module(name, globals = None, locals = None, fromlist = None, level = -1):
++ if level == -1:
++ try:
++ return modules[name].module
++ except KeyError:
++ pass
++ return builtin_importer(name, globals, locals, fromlist, level)
++else:
++ def import_module(name, globals = None, locals = None, fromlist = None):
++ try:
++ return modules[name].module
++ except KeyError:
++ return builtin_importer(name, globals, locals, fromlist)
+
+ __builtin__.__import__ = import_module
+
diff --git a/dev-python/myghty/myghty-1.1.ebuild b/dev-python/myghty/myghty-1.1-r1.ebuild
index c4a7678cea44..995aea7d6be9 100644
--- a/dev-python/myghty/myghty-1.1.ebuild
+++ b/dev-python/myghty/myghty-1.1-r1.ebuild
@@ -1,21 +1,22 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/myghty/myghty-1.1.ebuild,v 1.2 2007/07/04 17:47:36 pythonhead Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/myghty/myghty-1.1-r1.ebuild,v 1.1 2009/10/01 02:53:03 arfrever Exp $
-NEED_PYTHON=2.4
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
-inherit distutils
+inherit distutils eutils
-KEYWORDS="~amd64 ~x86"
-
-MY_PN=Myghty
-MY_P=${MY_PN}-${PV}
+MY_PN="Myghty"
+MY_P="${MY_PN}-${PV}"
DESCRIPTION="Template and view-controller framework derived from HTML::Mason."
HOMEPAGE="http://www.myghty.org"
SRC_URI="http://cheeseshop.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
LICENSE="MIT"
SLOT="0"
+KEYWORDS="~amd64 ~x86"
IUSE="doc test"
RDEPEND=">=dev-python/routes-1.0
@@ -24,23 +25,32 @@ RDEPEND=">=dev-python/routes-1.0
dev-python/pastescript"
DEPEND="${RDEPEND}
dev-python/setuptools"
+RESTRICT_PYTHON_ABIS="3.*"
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}/${P}-python-2.6.patch"
+}
src_compile() {
distutils_src_compile
- if use doc ; then
- einfo "Generation docs as requested..."
+ if use doc; then
cd doc
- PYTHONPATH=./lib/ python genhtml.py || die "generating docs failed"
+ PYTHONPATH=./lib/ python genhtml.py || die "Generation of documentation failed"
fi
}
+src_test() {
+ testing() {
+ PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" test/alltests.py
+ }
+ python_execute_function testing
+}
+
src_install() {
distutils_src_install
use doc && dohtml doc/html/*
}
-
-src_test() {
- PYTHONPATH=./lib/ "${python}" test/alltests.py || die "tests failed"
-}