diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-20 19:43:57 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-20 19:43:57 +0000 |
commit | 6dc49b72aabf0dc16d14a892e22ea9e13bc024be (patch) | |
tree | 5e09fac1d01de1c7c8680a4c97ee8626d89f5f08 /dev-python | |
parent | drop old, specially the ones still requiring obsolete sys-fs/sysfsutils (diff) | |
download | historical-6dc49b72aabf0dc16d14a892e22ea9e13bc024be.tar.gz historical-6dc49b72aabf0dc16d14a892e22ea9e13bc024be.tar.bz2 historical-6dc49b72aabf0dc16d14a892e22ea9e13bc024be.zip |
Add fix from Jon Salz for nested module importing.
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/jsonrpclib/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/jsonrpclib/files/jsonrpclib-fix-nested-imports.patch | 31 | ||||
-rw-r--r-- | dev-python/jsonrpclib/jsonrpclib-0_pre20110820-r1.ebuild | 33 |
3 files changed, 72 insertions, 1 deletions
diff --git a/dev-python/jsonrpclib/ChangeLog b/dev-python/jsonrpclib/ChangeLog index 0669ee745fb3..a49b26582866 100644 --- a/dev-python/jsonrpclib/ChangeLog +++ b/dev-python/jsonrpclib/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/jsonrpclib # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/jsonrpclib/ChangeLog,v 1.1 2012/04/18 14:54:21 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/jsonrpclib/ChangeLog,v 1.2 2012/04/20 19:43:57 vapier Exp $ + +*jsonrpclib-0_pre20110820-r1 (20 Apr 2012) + + 20 Apr 2012; Mike Frysinger <vapier@gentoo.org> + +jsonrpclib-0_pre20110820-r1.ebuild, + +files/jsonrpclib-fix-nested-imports.patch: + Add fix from Jon Salz for nested module importing. *jsonrpclib-9999 (18 Apr 2012) *jsonrpclib-0_pre20110820 (18 Apr 2012) diff --git a/dev-python/jsonrpclib/files/jsonrpclib-fix-nested-imports.patch b/dev-python/jsonrpclib/files/jsonrpclib-fix-nested-imports.patch new file mode 100644 index 000000000000..39e0463c91e7 --- /dev/null +++ b/dev-python/jsonrpclib/files/jsonrpclib-fix-nested-imports.patch @@ -0,0 +1,31 @@ +From 865a813078c1b447713aeb1f1bb860c441a88365 Mon Sep 17 00:00:00 2001 +From: Jon Salz <jsalz@chromium.org> +Date: Fri, 20 Apr 2012 02:41:50 +0800 +Subject: [PATCH] Fix importing of nested modules. + +https://github.com/joshmarshall/jsonrpclib/issues/15 +--- + jsonrpclib/jsonclass.py | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/jsonrpclib/jsonclass.py b/jsonrpclib/jsonclass.py +index 298c3da..1d86d5f 100644 +--- a/jsonrpclib/jsonclass.py ++++ b/jsonrpclib/jsonclass.py +@@ -129,6 +129,13 @@ def load(obj): + except ImportError: + raise TranslationError('Could not import %s from module %s.' % + (json_class_name, json_module_tree)) ++ ++ # The returned class is the top-level module, not the one we really ++ # want. (E.g., if we import a.b.c, we now have a.) Walk through other ++ # path components to get to b and c. ++ for i in json_module_parts[1:]: ++ temp_module = getattr(temp_module, i) ++ + json_class = getattr(temp_module, json_class_name) + # Creating the object... + new_obj = None +-- +1.7.3.4 + diff --git a/dev-python/jsonrpclib/jsonrpclib-0_pre20110820-r1.ebuild b/dev-python/jsonrpclib/jsonrpclib-0_pre20110820-r1.ebuild new file mode 100644 index 000000000000..ee5093f5f028 --- /dev/null +++ b/dev-python/jsonrpclib/jsonrpclib-0_pre20110820-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/jsonrpclib/jsonrpclib-0_pre20110820-r1.ebuild,v 1.1 2012/04/20 19:43:57 vapier Exp $ + +EAPI="4" + +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" +inherit distutils eutils + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/joshmarshall/jsonrpclib.git" + inherit git-2 +else + SRC_URI="mirror://gentoo/${P}.tar.bz2" + KEYWORDS="~amd64 ~arm ~x86" +fi + +DESCRIPTION="python implementation of the JSON-RPC spec (1.0 and 2.0)" +HOMEPAGE="https://github.com/joshmarshall/jsonrpclib" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND} + dev-python/simplejson" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-fix-nested-imports.patch + distutils_src_prepare +} |