diff options
author | Mike Gilbert <floppym@gentoo.org> | 2013-01-05 18:17:36 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2013-01-05 18:17:36 +0000 |
commit | 0025f15c842fbea266847668ab2b6d21d741f8b6 (patch) | |
tree | ce6680752b00155f5e7d44b01398fb6c1d855280 /dev-python/argh | |
parent | Add upstream patch to fix problems with unmounted network media, fixes bug 45... (diff) | |
download | gentoo-2-0025f15c842fbea266847668ab2b6d21d741f8b6.tar.gz gentoo-2-0025f15c842fbea266847668ab2b6d21d741f8b6.tar.bz2 gentoo-2-0025f15c842fbea266847668ab2b6d21d741f8b6.zip |
Fix UnicodeDecodeError in setup.py. Bug 448728 by flameeyes.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'dev-python/argh')
-rw-r--r-- | dev-python/argh/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/argh/argh-0.17.2.ebuild | 11 | ||||
-rw-r--r-- | dev-python/argh/files/argh-0.17.2-setup.py.patch | 40 |
3 files changed, 54 insertions, 5 deletions
diff --git a/dev-python/argh/ChangeLog b/dev-python/argh/ChangeLog index db32f873de06..d147e90c5be8 100644 --- a/dev-python/argh/ChangeLog +++ b/dev-python/argh/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/argh -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/argh/ChangeLog,v 1.3 2012/11/29 08:43:32 patrick Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/argh/ChangeLog,v 1.4 2013/01/05 18:17:36 floppym Exp $ + + 05 Jan 2013; Mike Gilbert <floppym@gentoo.org> + +files/argh-0.17.2-setup.py.patch, argh-0.17.2.ebuild: + Fix UnicodeDecodeError in setup.py. Bug 448728 by flameeyes. *argh-0.17.2 (29 Nov 2012) diff --git a/dev-python/argh/argh-0.17.2.ebuild b/dev-python/argh/argh-0.17.2.ebuild index 74b470c9e0cb..23e2d9417c13 100644 --- a/dev-python/argh/argh-0.17.2.ebuild +++ b/dev-python/argh/argh-0.17.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/argh/argh-0.17.2.ebuild,v 1.1 2012/11/29 08:43:32 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/argh/argh-0.17.2.ebuild,v 1.2 2013/01/05 18:17:36 floppym Exp $ EAPI=4 @@ -9,7 +9,7 @@ SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="2.5 2.5-jython" PYTHON_MODNAME="argh" -inherit distutils +inherit distutils eutils DESCRIPTION="A simple argparse wrapper." HOMEPAGE="http://packages.python.org/argh/" @@ -21,3 +21,8 @@ LICENSE="LGPL-3" RDEPEND="" DEPEND="" + +src_prepare() { + epatch "${FILESDIR}/${P}-setup.py.patch" + distutils_src_prepare +} diff --git a/dev-python/argh/files/argh-0.17.2-setup.py.patch b/dev-python/argh/files/argh-0.17.2-setup.py.patch new file mode 100644 index 000000000000..b3bd799bb116 --- /dev/null +++ b/dev-python/argh/files/argh-0.17.2-setup.py.patch @@ -0,0 +1,40 @@ +# HG changeset patch +# User Mike Gilbert <floppym@gentoo.org> +# Date 1357409273 18000 +# Node ID c4ba9e12eee5964399d62f638e02d6791c7d220c +# Parent 0942fae60b774e5a59b76295a05365168a35464e +Specify encoding when opening files in setup.py + +Fixes UnicodeDecodeError when installing under python3 with LANG=C. +https://bugs.gentoo.org/show_bug.cgi?id=448728 + +diff --git a/setup.py b/setup.py +--- a/setup.py ++++ b/setup.py +@@ -20,6 +20,7 @@ + # along with Argh. If not, see <http://gnu.org/licenses/>. + + ++import io + import os + + # Why distutils? +@@ -36,7 +37,7 @@ + # Importing `__version__` from `argh` would trigger a cascading import + # of `argparse`. We need to avoid this as Python < 2.7 ships without argparse. + __version__ = None +-with open('argh/__init__.py') as f: ++with io.open('argh/__init__.py', encoding='utf8') as f: + for line in f: + if line.startswith('__version__'): + exec(line) +@@ -44,7 +45,8 @@ + assert __version__, 'argh.__version__ must be imported correctly' + + +-readme = open(os.path.join(os.path.dirname(__file__), 'README')).read() ++with io.open(os.path.join(os.path.dirname(__file__), 'README'), encoding='ascii') as f: ++ readme = f.read() + + + setup( |