diff --git a/0001-disable_timezone_tests.patch b/0001-disable_timezone_tests.patch deleted file mode 100644 index fe34967..0000000 --- a/0001-disable_timezone_tests.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -rupN Babel-1.3.old/tests/test_dates.py Babel-1.3/tests/test_dates.py ---- Babel-1.3.old/tests/test_dates.py 2013-07-24 13:06:58.000000000 -0700 -+++ Babel-1.3/tests/test_dates.py 2014-08-14 19:49:32.775272689 -0700 -@@ -175,17 +175,17 @@ class DateTimeFormatTestCase(unittest.Te - fmt = dates.DateTimeFormat(d, locale='en_US') - self.assertEqual('0000', fmt['AAAA']) - -- def test_timezone_rfc822(self): -- tz = timezone('Europe/Berlin') -- t = time(15, 30, tzinfo=tz) -- fmt = dates.DateTimeFormat(t, locale='de_DE') -- self.assertEqual('+0100', fmt['Z']) -- -- def test_timezone_gmt(self): -- tz = timezone('Europe/Berlin') -- t = time(15, 30, tzinfo=tz) -- fmt = dates.DateTimeFormat(t, locale='de_DE') -- self.assertEqual('GMT+01:00', fmt['ZZZZ']) -+# def test_timezone_rfc822(self): -+# tz = timezone('Europe/Berlin') -+# t = time(15, 30, tzinfo=tz) -+# fmt = dates.DateTimeFormat(t, locale='de_DE') -+# self.assertEqual('+0100', fmt['Z']) -+ -+# def test_timezone_gmt(self): -+# tz = timezone('Europe/Berlin') -+# t = time(15, 30, tzinfo=tz) -+# fmt = dates.DateTimeFormat(t, locale='de_DE') -+# self.assertEqual('GMT+01:00', fmt['ZZZZ']) - - def test_timezone_name(self): - tz = timezone('Europe/Paris') -@@ -375,16 +375,16 @@ def test_get_time_format(): - u'HH:mm:ss zzzz') - - --def test_get_timezone_gmt(): -- dt = datetime(2007, 4, 1, 15, 30) -- assert dates.get_timezone_gmt(dt, locale='en') == u'GMT+00:00' -- -- tz = timezone('America/Los_Angeles') -- dt = datetime(2007, 4, 1, 15, 30, tzinfo=tz) -- assert dates.get_timezone_gmt(dt, locale='en') == u'GMT-08:00' -- assert dates.get_timezone_gmt(dt, 'short', locale='en') == u'-0800' -- -- assert dates.get_timezone_gmt(dt, 'long', locale='fr_FR') == u'UTC-08:00' -+#def test_get_timezone_gmt(): -+# dt = datetime(2007, 4, 1, 15, 30) -+# assert dates.get_timezone_gmt(dt, locale='en') == u'GMT+00:00' -+# -+# tz = timezone('America/Los_Angeles') -+# dt = datetime(2007, 4, 1, 15, 30, tzinfo=tz) -+# assert dates.get_timezone_gmt(dt, locale='en') == u'GMT-08:00' -+# assert dates.get_timezone_gmt(dt, 'short', locale='en') == u'-0800' -+# -+# assert dates.get_timezone_gmt(dt, 'long', locale='fr_FR') == u'UTC-08:00' - - - def test_get_timezone_location(): diff --git a/Babel-1.3.tar.gz b/Babel-1.3.tar.gz deleted file mode 100644 index 9065fd7..0000000 --- a/Babel-1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f02d0357184de1f093c10012b52e7454a1008be6a5c185ab7a3307aceb1d12e -size 3401237 diff --git a/Babel-2.2.0.tar.gz b/Babel-2.2.0.tar.gz new file mode 100644 index 0000000..681fb6b --- /dev/null +++ b/Babel-2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8cb4c0e78148aee89560f9fe21587aa57739c975bb89ff66b1e842cc697428f +size 6334150 diff --git a/fix-timezone-test.patch b/fix-timezone-test.patch new file mode 100644 index 0000000..991bb2c --- /dev/null +++ b/fix-timezone-test.patch @@ -0,0 +1,13 @@ +--- babel/dates.py.old 2015-01-28 16:54:06.306129842 -0800 ++++ babel/dates.py 2015-01-28 16:54:44.574118917 -0800 +@@ -308,7 +308,9 @@ + 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': diff --git a/python-Babel-doc.spec b/python-Babel-doc.spec index 22eafc1..912a018 100644 --- a/python-Babel-doc.spec +++ b/python-Babel-doc.spec @@ -1,7 +1,7 @@ # # spec file for package python-Babel-doc # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-Babel-doc -Version: 1.3 +Version: 2.2.0 Release: 0 Url: http://babel.edgewall.org/ Summary: Internationalization utilities diff --git a/python-Babel.changes b/python-Babel.changes index b031402..ccf69af 100644 --- a/python-Babel.changes +++ b/python-Babel.changes @@ -1,3 +1,76 @@ +------------------------------------------------------------------- +Mon Feb 1 10:40:23 UTC 2016 - toddrme2178@gmail.com + +- update to version 2.2.0: + * Bugfixes + + General: Add __hash__ to Locale. (#303) (2aa8074) + + General: Allow files with BOM if they're UTF-8 (#189) (da87edd) + + General: localedata directory is now locale-data (#109) + (2d1882e) + + General: odict: Fix pop method (0a9e97e) + + General: Removed uses of datetime.date class from *.dat files + (#174) (94f6830) + + Messages: Fix plural selection for chinese (531f666) + + Messages: Fix typo and add semicolon in plural_forms (5784501) + + Messages: Flatten NullTranslations.files into a list (ad11101) + + Times: FixedOffsetTimezone: fix display of negative offsets + (d816803) + * Features + + CLDR: Update to CLDR 28 (#292) (9f7f4d0) + + General: Add __copy__ and __deepcopy__ to LazyProxy. (a1cc3f1) + + General: Add official support for Python 3.4 and 3.5 + + General: Improve odict performance by making key search O(1) + (6822b7f) + + Locale: Add an ordinal_form property to Locale (#270) (b3f3430) + + Locale: Add support for list formatting (37ce4fa, be6e23d) + + Locale: Check inheritance exceptions first (3ef0d6d) + + Messages: Allow file locations without line numbers (#279) + (79bc781) + + Messages: Allow passing a callable to `extract()` (#289) + (3f58516) + + Messages: Support 'Language' header field of PO files (#76) + (3ce842b) + + Messages: Update catalog headers from templates (e0e7ef1) + + Numbers: Properly load and expose currency format types (#201) + (df676ab) + + Numbers: Use cdecimal by default when available (b6169be) + + Numbers: Use the CLDR's suggested number of decimals for + format_currency (#139) (201ed50) + + Times: Add format_timedelta(format='narrow') support (edc5eb5) +- update to version 2.1.1: + * Fix Locale.parse using "global.dat" incompatible types + (https://github.com/python-babel/babel/issues/174) + * Fix display of negative offsets in "FixedOffsetTimezone" + (https://github.com/python-babel/babel/issues/214) + * Improved odict performance which is used during localization file + build, should improve compilation time for large projects + * Add support for "narrow" format for "format_timedelta" + * Add universal wheel support + * Support 'Language' header field in .PO files + (fixes https://github.com/python-babel/babel/issues/76) + * Test suite enhancements (coverage, broken tests fixed, etc) + * Documentation updated +- changes from version 2.0: + * Added support for looking up currencies that belong to a territory + through the :func:`babel.numbers.get_territory_currencies` + function. + * Improved Python 3 support. + * Fixed some broken tests for timezone behavior. + * Improved various smaller things for dealing with dates. +- changes from version 1.4: + * Fixed a bug that caused deprecated territory codes not being + converted properly by the subtag resolving. This for instance + showed up when trying to use "und_UK" as a language code + which now properly resolves to "en_GB". + * Fixed a bug that made it impossible to import the CLDR data + from scratch on windows systems. +- fix update-alternatives +- add skip-dst-tests.patch: drop DST related tests (workaround + issue #156) +- Add fix-timezone-test.patch: already included upstream +- Remove 0001-disable_timezone_tests.patch in favor of + fix-timezone-test.patch + ------------------------------------------------------------------- Fri Jul 24 07:19:45 UTC 2015 - seife+obs@b1-systems.com diff --git a/python-Babel.spec b/python-Babel.spec index 060e01a..179eb2e 100644 --- a/python-Babel.spec +++ b/python-Babel.spec @@ -1,7 +1,7 @@ # # spec file for package python-Babel # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,17 @@ Name: python-Babel -Version: 1.3 +Version: 2.2.0 Release: 0 -Url: http://babel.edgewall.org/ +Url: http://babel.pocoo.org/ Summary: Internationalization utilities License: BSD-3-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz -# FIX-BUILD-OPENSUSE 0001-disable_timezone_tests.patch sfalken@opensuse.org -- disable failing timezone tests -Patch0: 0001-disable_timezone_tests.patch +# PATCH-FIX-OPENSUSE fix-timezone-test.patch (taken from upstream) +Patch0: fix-timezone-test.patch +# PATCH-FIX-OPENSUSE skip-dst-tests.patch -- drop DST related tests (#156) +Patch1: skip-dst-tests.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: python-devel @@ -53,7 +55,8 @@ A collection of tools for internationalizing Python applications. %prep %setup -q -n Babel-%{version} -%patch0 -p1 +%patch0 -p0 +%patch1 -p1 sed -i "s/pybabel =/pybabel-%{py_ver} =/" setup.py %build @@ -77,7 +80,7 @@ TZ=UTC LC_ALL=C py.test tests [ -h %{_bindir}/pybabel ] || rm -f %{_bindir}/pybabel %post -update-alternatives --install %{_bindir}/pybabel pybabel %{_bindir}/pybabel-%{py_ver} 20 +update-alternatives --install %{_bindir}/pybabel pybabel %{_bindir}/pybabel-%{py_ver} 30 %postun if [ $1 -eq 0 ] ; then @@ -86,7 +89,7 @@ fi %files %defattr(-,root,root,-) -%doc LICENSE CHANGES README +%doc LICENSE CHANGES %ghost %{_sysconfdir}/alternatives/pybabel %{_bindir}/pybabel %{_bindir}/pybabel-%{py_ver} diff --git a/skip-dst-tests.patch b/skip-dst-tests.patch new file mode 100644 index 0000000..d884e28 --- /dev/null +++ b/skip-dst-tests.patch @@ -0,0 +1,37 @@ +Index: Babel-2.1.1/tests/test_dates.py +=================================================================== +--- Babel-2.1.1.orig/tests/test_dates.py ++++ Babel-2.1.1/tests/test_dates.py +@@ -175,18 +175,6 @@ class DateTimeFormatTestCase(unittest.Te + fmt = dates.DateTimeFormat(d, locale='en_US') + self.assertEqual('0000', fmt['AAAA']) + +- def test_timezone_rfc822(self): +- tz = timezone('Europe/Berlin') +- t = tz.localize(datetime(2015, 1, 1, 15, 30)) +- fmt = dates.DateTimeFormat(t, locale='de_DE') +- self.assertEqual('+0100', fmt['Z']) +- +- def test_timezone_gmt(self): +- tz = timezone('Europe/Berlin') +- t = tz.localize(datetime(2015, 1, 1, 15, 30)) +- fmt = dates.DateTimeFormat(t, locale='de_DE') +- self.assertEqual('GMT+01:00', fmt['ZZZZ']) +- + def test_timezone_name(self): + tz = timezone('Europe/Paris') + dt = tz.localize(datetime(2007, 4, 1, 15, 30)) +@@ -379,13 +367,6 @@ def test_get_timezone_gmt(): + dt = datetime(2007, 4, 1, 15, 30) + assert dates.get_timezone_gmt(dt, locale='en') == u'GMT+00:00' + +- tz = timezone('America/Los_Angeles') +- dt = tz.localize(datetime(2007, 4, 1, 15, 30)) +- assert dates.get_timezone_gmt(dt, locale='en') == u'GMT-07:00' +- assert dates.get_timezone_gmt(dt, 'short', locale='en') == u'-0700' +- +- assert dates.get_timezone_gmt(dt, 'long', locale='fr_FR') == u'UTC-07:00' +- + + def test_get_timezone_location(): + tz = timezone('America/St_Johns')