summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-04-04 02:54:29 +0000
committerMike Gilbert <floppym@gentoo.org>2012-04-04 02:54:29 +0000
commita87c20db82bf5e7dad1bd4400639d9e57bdb2f98 (patch)
tree360641cfe6eb381dc8d706b5aed60547a40bdf70 /dev-python
parentStable for HPPA (bug #410731). (diff)
downloadgentoo-2-a87c20db82bf5e7dad1bd4400639d9e57bdb2f98.tar.gz
gentoo-2-a87c20db82bf5e7dad1bd4400639d9e57bdb2f98.tar.bz2
gentoo-2-a87c20db82bf5e7dad1bd4400639d9e57bdb2f98.zip
Fix UnicodeDecodeError in setup.py. Bug 410725.
(Portage version: 2.2.0_alpha99/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/python-dateutil/ChangeLog6
-rw-r--r--dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch21
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.1.ebuild9
3 files changed, 32 insertions, 4 deletions
diff --git a/dev-python/python-dateutil/ChangeLog b/dev-python/python-dateutil/ChangeLog
index 3611e7132aaf..4175190055d2 100644
--- a/dev-python/python-dateutil/ChangeLog
+++ b/dev-python/python-dateutil/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/python-dateutil
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/python-dateutil/ChangeLog,v 1.37 2012/04/01 17:27:16 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-dateutil/ChangeLog,v 1.38 2012/04/04 02:54:29 floppym Exp $
+
+ 04 Apr 2012; Mike Gilbert <floppym@gentoo.org>
+ +files/python-dateutil-2.1-open-utf-8.patch, python-dateutil-2.1.ebuild:
+ Fix UnicodeDecodeError in setup.py. Bug 410725.
01 Apr 2012; Mike Gilbert <floppym@gentoo.org> python-dateutil-2.1.ebuild:
Update HOMEPAGE.
diff --git a/dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch b/dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch
new file mode 100644
index 000000000000..f27285428784
--- /dev/null
+++ b/dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch
@@ -0,0 +1,21 @@
+Fix UnicodeDecodeError in setup.py.
+
+https://bugs.gentoo.org/show_bug.cgi?id=410725
+--- setup.py
++++ setup.py
+@@ -1,5 +1,6 @@
+ #!/usr/bin/python
+ from os.path import isfile, join
++import codecs
+ import glob
+ import os
+ import re
+@@ -13,7 +14,7 @@
+
+ TOPDIR = os.path.dirname(__file__) or "."
+ VERSION = re.search('__version__ = "([^"]+)"',
+- open(TOPDIR + "/dateutil/__init__.py").read()).group(1)
++ codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1)
+
+
+ setup(name="python-dateutil",
diff --git a/dev-python/python-dateutil/python-dateutil-2.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.1.ebuild
index 324ece27951a..5f006f9d14e4 100644
--- a/dev-python/python-dateutil/python-dateutil-2.1.ebuild
+++ b/dev-python/python-dateutil/python-dateutil-2.1.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/python-dateutil/python-dateutil-2.1.ebuild,v 1.2 2012/04/01 17:27:16 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-dateutil/python-dateutil-2.1.ebuild,v 1.3 2012/04/04 02:54:29 floppym Exp $
EAPI="4"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="2.5 *-pypy-*"
-inherit distutils
+inherit distutils eutils
DESCRIPTION="Extensions to the standard Python datetime module"
HOMEPAGE="https://launchpad.net/dateutil http://pypi.python.org/pypi/python-dateutil"
@@ -27,7 +27,8 @@ DOCS="NEWS README"
PYTHON_MODNAME="dateutil"
src_prepare() {
- distutils_src_prepare
+ # Bug 410725.
+ epatch "${FILESDIR}/${P}-open-utf-8.patch"
# Use zoneinfo in /usr/share/zoneinfo.
sed -i -e "s/zoneinfo.gettz/gettz/g" test.py || die
@@ -35,6 +36,8 @@ src_prepare() {
# Fix parsing of date in non-English locales.
sed -e 's/subprocess.getoutput("date")/subprocess.getoutput("LC_ALL=C date")/' \
-i example.py || die
+
+ distutils_src_prepare
}
src_test() {