[packages/python-babel] Fix some failing tests
jajcus
jajcus at pld-linux.org
Mon Nov 30 19:30:45 CET 2015
commit 006ed0f7b982e12b66a176e74218eb2c729c147e
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Mon Nov 30 19:29:07 2015 +0100
Fix some failing tests
https://github.com/python-babel/babel/issues/133
python-babel.spec | 2 ++
tz.patch | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+)
---
diff --git a/python-babel.spec b/python-babel.spec
index 6758ef1..0a77761 100644
--- a/python-babel.spec
+++ b/python-babel.spec
@@ -16,6 +16,7 @@ Group: Development/Languages/Python
#Source0Download: https://pypi.python.org/pypi/Babel
Source0: https://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz
# Source0-md5: cab63d158ceed3a809703711cfb8cbd5
+Patch0: tz.patch
URL: http://babel.pocoo.org/
%if %{with python2}
BuildRequires: python-devel
@@ -79,6 +80,7 @@ Dokumentacja API biblioteki Pythona Babel.
%prep
%setup -q -n Babel-%{version}
+%patch0 -p1
%build
%if %{with python2}
diff --git a/tz.patch b/tz.patch
new file mode 100644
index 0000000..d6ac3c0
--- /dev/null
+++ b/tz.patch
@@ -0,0 +1,24 @@
+From 00e8526246ef292a5071303f25877fcf8c0a2dc8 Mon Sep 17 00:00:00 2001
+From: st4lk <myhappydo at gmail.com>
+Date: Mon, 26 Jan 2015 10:07:12 +0300
+Subject: [PATCH] apply fix #134 for babel issue #133
+
+---
+ babel/dates.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/babel/dates.py b/babel/dates.py
+index 73d54fa..a1b4cd7 100644
+--- a/babel/dates.py
++++ b/babel/dates.py
+@@ -308,7 +308,9 @@ def get_timezone_gmt(datetime=None, width='long', locale=LC_TIME):
+ datetime = datetime.replace(tzinfo=UTC)
+ locale = Locale.parse(locale)
+
+- offset = datetime.tzinfo.utcoffset(datetime)
++ # fix for mitsuhiko/babel#133 : Any time will do since we just want the
++ # offset
++ offset = datetime.tzinfo.utcoffset(datetime_.utcnow())
+ seconds = offset.days * 24 * 60 * 60 + offset.seconds
+ hours, seconds = divmod(seconds, 3600)
+ if width == 'short':
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-babel.git/commitdiff/21523b253554bf21f370d70eb88f016ffc079c5c
More information about the pld-cvs-commit
mailing list