[packages/python-babel] - updated to 2.5.3 - dropped tz patch (original issue seems fixed in another way and this patch brok

qboosh qboosh at pld-linux.org
Tue May 29 05:41:58 CEST 2018


commit b623e0234ef6048ebfaf221d8e958b8630c2dbd1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue May 29 05:42:54 2018 +0200

    - updated to 2.5.3
    - dropped tz patch (original issue seems fixed in another way and this patch broke offset calculation for timezones using DST)

 python-babel.spec | 53 +++++++++++++++++++++++++++++++----------------------
 tz.patch          | 24 ------------------------
 2 files changed, 31 insertions(+), 46 deletions(-)
---
diff --git a/python-babel.spec b/python-babel.spec
index a00befa..bc053a4 100644
--- a/python-babel.spec
+++ b/python-babel.spec
@@ -1,10 +1,7 @@
 #
-# TODO:
-#	- tests fail on 'local' timezone
-#
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
-%bcond_with	tests	# test target
+%bcond_without	tests	# unit tests
 %bcond_without	python2	# CPython 2.x module
 %bcond_without	python3	# CPython 3.x module
 
@@ -13,33 +10,39 @@
 Summary:	Babel - internationalization library for Python 2
 Summary(pl.UTF-8):	Babel - biblioteka umiędzynaradawiająca dla Pythona 2
 Name:		python-%{module}
-Version:	2.4.0
+Version:	2.5.3
 Release:	1
 License:	BSD-like
 Group:		Development/Languages/Python
-#Source0Download: https://pypi.python.org/simple/Babel
-Source0:	https://files.pythonhosted.org/packages/source/B/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
-# Source0-md5:	90e7a0add19b2036a9b415630a0d9388
-Patch0:		tz.patch
+#Source0Download: https://pypi.org/simple/Babel/
+Source0:	https://files.pythonhosted.org/packages/source/B/Babel/%{pypi_name}-%{version}.tar.gz
+# Source0-md5:	152a6b17fe4110b95675aceb9af9fab2
 URL:		http://babel.pocoo.org/
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
 BuildRequires:	python-devel >= 1:2.6
 BuildRequires:	python-devel-tools >= 1:2.6
+BuildRequires:	python-modules >= 1:2.6
 BuildRequires:	python-setuptools
-BuildRequires:	python-pytz
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	python-pytz >= 0a
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-devel >= 1:3.3
 BuildRequires:	python3-devel-tools >= 1:3.3
-BuildRequires:	python3-setuptools
 BuildRequires:	python3-modules >= 1:3.3
-BuildRequires:	python3-pytz
+BuildRequires:	python3-setuptools
+BuildRequires:	python3-pytz >= 0a
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
 %endif
 %{?with_doc:BuildRequires: sphinx-pdg}
 Requires:	python-modules >= 1:2.6
-Requires:	python-pytz
+Requires:	python-pytz >= 0a
 Obsoletes:	python-Babel
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -59,7 +62,7 @@ Summary:	Babel - internationalization library for Python 3
 Summary(pl.UTF-8):	Babel - biblioteka umiędzynaradawiająca dla Pythona 3
 Group:		Libraries/Python
 Requires:	python3-modules >= 1:3.3
-Requires:	python3-pytz
+Requires:	python3-pytz >= 0a
 
 %description -n python3-%{module}
 Babel is a Python library that provides an integrated collection of
@@ -84,21 +87,27 @@ Dokumentacja API biblioteki Pythona Babel.
 
 %prep
 %setup -q -n Babel-%{version}
-%patch0 -p1
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+py.test-2 tests
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+py.test-3 tests
+%endif
 %endif
 
 %if %{with doc}
-cd docs
-%{__make} -j1 html
-%{__rm} -r _build/html/_sources
+%{__make} -C docs -j1 html
+%{__rm} -r docs/_build/html/_sources
 %endif
 
 %install
diff --git a/tz.patch b/tz.patch
deleted file mode 100644
index d6ac3c0..0000000
--- a/tz.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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/b623e0234ef6048ebfaf221d8e958b8630c2dbd1



More information about the pld-cvs-commit mailing list