Date: Friday, October 21, 2022 @ 19:33:20
Author: felixonmars
Revision: 1333283
archrelease: copy trunk to community-staging-x86_64
Added:
python-pyicu/repos/community-staging-x86_64/
python-pyicu/repos/community-staging-x86_64/PKGBUILD
(from rev 1333282, python-pyicu/trunk/PKGBUILD)
python-pyicu/repos/community-staging-x86_64/icu72.patch
(from rev 1333282, python-pyicu/trunk/icu72.patch)
-------------+
PKGBUILD | 38 +++++++++++++++++++++++++
icu72.patch | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 123 insertions(+)
Copied: python-pyicu/repos/community-staging-x86_64/PKGBUILD (from rev 1333282,
python-pyicu/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-10-21 19:33:20 UTC (rev 1333283)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Jonathan Liu <[email protected]>
+
+pkgname=python-pyicu
+pkgver=2.9
+pkgrel=2
+pkgdesc="Python binding for ICU"
+arch=('x86_64')
+license=('MIT')
+url="http://pyicu.osafoundation.org/"
+depends=('python' 'icu')
+makedepends=('python-setuptools')
+checkdepends=('python-fonttools' 'python-pytest' 'python-six')
+source=("https://pypi.io/packages/source/P/PyICU/PyICU-$pkgver.tar.gz"
+ icu72.patch)
+sha512sums=('49b0961ed855517f039ac8a863b1af1a58c6716751eb1f5cebb987a16faabc5585ed6ed3ed3d80d4cf45e9091d855cafe4b6683f4d274e5c4d41c9dab9164799'
+
'2bd8862836693d851e3e701424409c6a6c69410aaf2f0bc84d33762f5fb8857f7f610f8696aa4724b35d1fcf797ec4f930408031d82e2c6b179a59b6aa53c409')
+
+prepare() {
+ cd PyICU-$pkgver
+ patch -Np1 -i ../icu72.patch
+}
+
+build() {
+ cd PyICU-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd PyICU-$pkgver
+ python setup.py test
+}
+
+package() {
+ cd PyICU-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Copied: python-pyicu/repos/community-staging-x86_64/icu72.patch (from rev
1333282, python-pyicu/trunk/icu72.patch)
===================================================================
--- community-staging-x86_64/icu72.patch (rev 0)
+++ community-staging-x86_64/icu72.patch 2022-10-21 19:33:20 UTC (rev
1333283)
@@ -0,0 +1,85 @@
+From 8331f889a1e840ebe7f550685842943c3fe561cd Mon Sep 17 00:00:00 2001
+From: Andi Vajda <[email protected]>
+Date: Thu, 29 Sep 2022 12:27:22 -0700
+Subject: [PATCH] fixed tests for icu-72rc
+
+---
+ setup.py | 2 +-
+ test/test_DateTimePatternGenerator.py | 41 +++++++++++++++++++--------
+ 2 files changed, 30 insertions(+), 13 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 52179e9..dafb5df 100644
+--- a/setup.py
++++ b/setup.py
+@@ -9,7 +9,7 @@ except ImportError:
+ from distutils.spawn import find_executable
+
+ VERSION = '2.9'
+-ICU_MAX_MAJOR_VERSION = '71' # max supported major version of ICU
++ICU_MAX_MAJOR_VERSION = '72' # max supported major version of ICU
+
+ try:
+ from subprocess import check_output as subprocess_check_output
+diff --git a/test/test_DateTimePatternGenerator.py
b/test/test_DateTimePatternGenerator.py
+index 67d3ce0..eec2583 100644
+--- a/test/test_DateTimePatternGenerator.py
++++ b/test/test_DateTimePatternGenerator.py
+@@ -71,17 +71,31 @@ class TestDateTimePatternGenerator(TestCase):
+ 'MMMMd', # full name of month + day of the month, i.e.,
October 25
+ 'hhmm', # 12-hour-cycle format, i.e., 1:32 PM
+ 'jjmm') # preferred hour format for the given locale,
i.e., 24-hour-cycle format for fr_FR
+- locales = (
+- (Locale('en_US'),
+- (u'2nd quarter 2016', u'May 2016', u'May 9', u'5:30 PM',
+- u'5:30 PM')),
+- (Locale('fr_FR'),
+- (u'2e trimestre 2016', u'mai 2016', u'9 mai', u'5:30 PM',
+- u'17:30')),
+- (Locale('zh_CN'),
+- (u'2016年第2季度', u'2016年5月', u'5月9日', u'下午5:30',
+- u'17:30' if ICU_VERSION >= '70.1' else u'下午5:30')),
+- )
++ if ICU_VERSION < '72.0':
++ locales = (
++ (Locale('en_US'),
++ (u'2nd quarter 2016', u'May 2016', u'May 9', u'5:30 PM',
++ u'5:30 PM')),
++ (Locale('fr_FR'),
++ (u'2e trimestre 2016', u'mai 2016', u'9 mai', u'5:30 PM',
++ u'17:30')),
++ (Locale('zh_CN'),
++ (u'2016年第2季度', u'2016年5月', u'5月9日', u'下午5:30',
++ u'17:30' if ICU_VERSION >= '70.1' else u'下午5:30')),
++ )
++ else:
++ locales = (
++ (Locale('en_US'),
++ (u'2nd quarter 2016', u'May 2016', u'May 9', u'5:30\u202fPM',
++ u'5:30\u202fPM')),
++ (Locale('fr_FR'),
++ (u'2e trimestre 2016', u'mai 2016', u'9 mai',
u'5:30\u202fPM',
++ u'17:30')),
++ (Locale('zh_CN'),
++ (u'2016年第2季度', u'2016年5月', u'5月9日', u'下午5:30',
++ u'17:30' if ICU_VERSION >= '70.1' else u'下午5:30')),
++ )
++
+ for locale, locale_data in locales:
+ dtpg = DateTimePatternGenerator.createInstance(locale)
+ for index, skeleton in enumerate(skeletons):
+@@ -98,7 +112,10 @@ class TestDateTimePatternGenerator(TestCase):
+ sdf.setTimeZone(self.tz)
+ pattern = sdf.toPattern()
+ self.assertEqual(pattern, u'EEEE d MMMM y HH:mm:ss zzzz')
+- self.assertEqual(sdf.format(self.date), u'lundi 9 mai 2016 17:30:00
heure d’été du Pacifique')
++ if ICU_VERSION < '72.0':
++ self.assertEqual(sdf.format(self.date), u'lundi 9 mai 2016
17:30:00 heure d’été du Pacifique')
++ else:
++ self.assertEqual(sdf.format(self.date), u'lundi 9 mai 2016
17:30:00 heure d’été du Pacifique nord-américain')
+
+ newPattern = dtpg.replaceFieldTypes(pattern, 'vvvv')
+ sdf.applyPattern(newPattern)
+--
+GitLab
+