forked from pool/python-PyICU
Accepting request 912078 from home:DocB:branches:devel:languages:python
- 2.7.4 - added wrappers for UWordBreak and BreakIterator.getRuleStatusVec() - added wrappers for MessagePattern (Roman Kalukiewicz) - added wrapper for Collator::getKeywordValuesForLocale - added wrappers for LocaleMatcher.acceptLanguage|FromHTTP() - worked around limitation of Visual Studio 2017 (cgohlke) - added missing test and samples files to distribution (foutrelis) - added some tests for TimeZone classes - fixed bug w/FormattedNumberRange.getFirst|SecondDecimal() gone w/ ICU 68.1+ - fixed bug with VTimeZone.write() wrapper invoking VTimeZone.writeSimple() - added wrapper for Locale.canonicalize() - added wrappers for MeasureUnit.product(), reciprocal(), getDimensionality() - added wrapper for MeasureUnit.forIdentifier() - implemented *, /, **, 1/m for MeasureUnit in terms of product and reciprocal - added wrappers for BasicTimeZone, RuleBasedTimeZone, VTimeZone - added wrappers for TimeZoneTransition, TimeZoneRule and its subclasses - added wrappers for DateTimeRule, DateRuleType, TimeRuleType - added support for ICU 69.1 (support-icu-69.patch reomoved) OBS-URL: https://build.opensuse.org/request/show/912078 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyICU?expand=0&rev=19
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a9a5bf6833360f8f69e9375b91c1a7dd6e0c9157a42aee5bb7d6891804d96371
|
||||
size 233826
|
3
PyICU-2.7.4.tar.gz
Normal file
3
PyICU-2.7.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c0655302e2aea16f9acefe04152f74e5d7d70542e9e15c89ee8d763c8e097f56
|
||||
size 298560
|
@@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 13 17:36:21 UTC 2021 - Axel Braun <axel.braun@gmx.de>
|
||||
|
||||
- 2.7.4
|
||||
- added wrappers for UWordBreak and BreakIterator.getRuleStatusVec()
|
||||
- added wrappers for MessagePattern (Roman Kalukiewicz)
|
||||
- added wrapper for Collator::getKeywordValuesForLocale
|
||||
- added wrappers for LocaleMatcher.acceptLanguage|FromHTTP()
|
||||
- worked around limitation of Visual Studio 2017 (cgohlke)
|
||||
- added missing test and samples files to distribution (foutrelis)
|
||||
- added some tests for TimeZone classes
|
||||
- fixed bug w/FormattedNumberRange.getFirst|SecondDecimal() gone w/ ICU 68.1+
|
||||
- fixed bug with VTimeZone.write() wrapper invoking VTimeZone.writeSimple()
|
||||
- added wrapper for Locale.canonicalize()
|
||||
- added wrappers for MeasureUnit.product(), reciprocal(), getDimensionality()
|
||||
- added wrapper for MeasureUnit.forIdentifier()
|
||||
- implemented *, /, **, 1/m for MeasureUnit in terms of product and reciprocal
|
||||
- added wrappers for BasicTimeZone, RuleBasedTimeZone, VTimeZone
|
||||
- added wrappers for TimeZoneTransition, TimeZoneRule and its subclasses
|
||||
- added wrappers for DateTimeRule, DateRuleType, TimeRuleType
|
||||
- added support for ICU 69.1 (support-icu-69.patch reomoved)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 28 08:06:12 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package python-PyICU
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
@@ -19,15 +19,13 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%global modname PyICU
|
||||
Name: python-%{modname}
|
||||
Version: 2.6
|
||||
Version: 2.7.4
|
||||
Release: 0
|
||||
Summary: Python Extension Wrapping the ICU C++ API
|
||||
License: MIT
|
||||
Group: Development/Libraries/Python
|
||||
URL: https://github.com/ovalhub/pyicu
|
||||
Source0: https://files.pythonhosted.org/packages/source/P/PyICU/%{modname}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM: Support for ICU 69 commited upstream, spread over 2 commits
|
||||
Patch0: support-icu-69.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -48,7 +46,6 @@ library (ICU).
|
||||
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
|
@@ -1,100 +0,0 @@
|
||||
From 15d2ba67677369aae8b0964f18e9cdbf70a414b2 Mon Sep 17 00:00:00 2001
|
||||
From: ovalhub <11970237+ovalhub@users.noreply.github.com>
|
||||
Date: Fri, 26 Mar 2021 12:53:37 -0700
|
||||
Subject: [PATCH] fix build and test failures with icu 69rc
|
||||
|
||||
---
|
||||
numberformat.cpp | 6 ++++++
|
||||
test/test_DateTimeParserGenerator.py | 1 -
|
||||
test/test_NumberFormatter.py | 16 ++++++++++++----
|
||||
3 files changed, 18 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/numberformat.cpp b/numberformat.cpp
|
||||
index a5deba1..5a5e6ee 100644
|
||||
--- a/numberformat.cpp
|
||||
+++ b/numberformat.cpp
|
||||
@@ -597,10 +597,12 @@ DECLARE_BY_VALUE_TYPE(FormattedNumber, t_formattednumber, FormattedValue,
|
||||
/* FormattedNumberRange */
|
||||
/* t_formattednumberrange declared in numberformat.h */
|
||||
|
||||
+#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0)
|
||||
static PyObject *t_formattednumberrange_getFirstDecimal(
|
||||
t_formattednumberrange *self);
|
||||
static PyObject *t_formattednumberrange_getSecondDecimal(
|
||||
t_formattednumberrange *self);
|
||||
+#endif
|
||||
static PyObject *t_formattednumberrange_getIdentityResult(
|
||||
t_formattednumberrange *self);
|
||||
#if U_ICU_VERSION_HEX >= VERSION_HEX(68, 0, 0)
|
||||
@@ -609,8 +611,10 @@ static PyObject *t_formattednumberrange_getDecimalNumbers(
|
||||
#endif
|
||||
|
||||
static PyMethodDef t_formattednumberrange_methods[] = {
|
||||
+#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0)
|
||||
DECLARE_METHOD(t_formattednumberrange, getFirstDecimal, METH_NOARGS),
|
||||
DECLARE_METHOD(t_formattednumberrange, getSecondDecimal, METH_NOARGS),
|
||||
+#endif
|
||||
DECLARE_METHOD(t_formattednumberrange, getIdentityResult, METH_NOARGS),
|
||||
#if U_ICU_VERSION_HEX >= VERSION_HEX(68, 0, 0)
|
||||
DECLARE_METHOD(t_formattednumberrange, getDecimalNumbers, METH_NOARGS),
|
||||
@@ -5208,6 +5212,7 @@ static PyObject *t_formattednumber_getOutputUnit(t_formattednumber *self)
|
||||
|
||||
/* FormattedNumberRange */
|
||||
|
||||
+#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0)
|
||||
static PyObject *t_formattednumberrange_getFirstDecimal(
|
||||
t_formattednumberrange *self)
|
||||
{
|
||||
@@ -5227,6 +5232,7 @@ static PyObject *t_formattednumberrange_getSecondDecimal(
|
||||
|
||||
return PyUnicode_FromUnicodeString(&u);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static PyObject *t_formattednumberrange_getIdentityResult(
|
||||
t_formattednumberrange *self)
|
||||
diff --git a/test/test_DateTimeParserGenerator.py b/test/test_DateTimeParserGenerator.py
|
||||
index 6d37c22..ef9a00f 100644
|
||||
--- a/test/test_DateTimeParserGenerator.py
|
||||
+++ b/test/test_DateTimeParserGenerator.py
|
||||
@@ -63,7 +63,6 @@ class TestDateTimePatternGenerator(TestCase):
|
||||
else:
|
||||
self.assertEqual(sdf.format(self.date), u'09. von mai, 17:30')
|
||||
self.assertEqual(sdf.toPattern(), u"dd'. von' MMMM, HH:mm")
|
||||
-
|
||||
|
||||
def testGetBestPattern(self):
|
||||
"""Test a few different languages and common patterns."""
|
||||
diff --git a/test/test_NumberFormatter.py b/test/test_NumberFormatter.py
|
||||
index a69f39b..8c85005 100644
|
||||
--- a/test/test_NumberFormatter.py
|
||||
+++ b/test/test_NumberFormatter.py
|
||||
@@ -161,13 +161,21 @@ class TestNumberRangeFormatter(TestCase):
|
||||
self.assertEqual(str(value), u'0,333-0,25')
|
||||
self.assertEqual(repr(value), u'<FormattedNumberRange: 0,333-0,25>')
|
||||
|
||||
- self.assertEqual(value.getFirstDecimal(), u'3.33E-1')
|
||||
- self.assertEqual(value.getSecondDecimal(), u'2.5E-1')
|
||||
+ if ICU_VERSION < '69.0':
|
||||
+ self.assertEqual(value.getFirstDecimal(), u'3.33E-1')
|
||||
+ self.assertEqual(value.getSecondDecimal(), u'2.5E-1')
|
||||
+ self.assertEqual(
|
||||
+ [(x.getStart(), x.getLimit()) for x in value],
|
||||
+ [(0, 1), (1, 2), (2, 5), (6, 7), (7, 8), (8, 10)])
|
||||
+ else:
|
||||
+ self.assertEqual(
|
||||
+ [(x.getStart(), x.getLimit()) for x in value],
|
||||
+ [(0, 5), (0, 1), (1, 2), (2, 5), (6, 10), (6, 7), (7, 8),
|
||||
+ (8, 10)])
|
||||
+
|
||||
if ICU_VERSION >= '68.0':
|
||||
self.assertEqual(value.getDecimalNumbers(), (b'0.333', b'0.25'))
|
||||
|
||||
- self.assertEqual([(x.getStart(), x.getLimit()) for x in value],
|
||||
- [(0, 1), (1, 2), (2, 5), (6, 7), (7, 8), (8, 10)])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
--
|
||||
GitLab
|
||||
|
Reference in New Issue
Block a user