forked from pool/python-PyICU
- Update to 2.15 * fixed build error missing conditional ICU < 70 in UnicodeSetIterator() * fixed Enum arg parser with broken strict aliasing rules (Jakub Wilk) - Refresh remove_six.patch OBS-URL: https://build.opensuse.org/request/show/1268579 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyICU?expand=0&rev=43
276 lines
11 KiB
Diff
276 lines
11 KiB
Diff
diff -Nru pyicu-2.15.orig/setup.py pyicu-2.15/setup.py
|
|
--- pyicu-2.15.orig/setup.py 2025-03-23 10:55:56.000000000 +0100
|
|
+++ pyicu-2.15/setup.py 2025-04-11 11:37:48.987583659 +0200
|
|
@@ -1,4 +1,3 @@
|
|
-
|
|
import os, sys
|
|
|
|
try:
|
|
@@ -195,7 +194,7 @@
|
|
except:
|
|
if not _cflags:
|
|
raise RuntimeError('''
|
|
-Please install pkg-config on your system or set the PYICU_CFLAGS environment
|
|
+Please install pkg-config on your system or set the PYICU_CFLAGS environment
|
|
variable to the flags required by the C++ compiler to find the header files
|
|
for ICU, and possibly -std=c++11 if using ICU version >= 60 or -std=c++17 if using ICU version >= 75
|
|
''')
|
|
@@ -234,7 +233,7 @@
|
|
Please install pkg-config on your system or set the PYICU_LFLAGS environment
|
|
variable to the flags required by the linker to find the libraries for ICU
|
|
''')
|
|
-
|
|
+
|
|
|
|
if 'PYICU_LIBRARIES' in os.environ:
|
|
_libraries = os.environ['PYICU_LIBRARIES'].split(os.pathsep)
|
|
@@ -283,4 +282,4 @@
|
|
libraries=_libraries)],
|
|
package_dir={"": "py"},
|
|
packages=['icu'],
|
|
- tests_require=['pytest', 'six'])
|
|
+ tests_require=['pytest'])
|
|
diff -Nru pyicu-2.15.orig/test/test_BytesTrie.py pyicu-2.15/test/test_BytesTrie.py
|
|
--- pyicu-2.15.orig/test/test_BytesTrie.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_BytesTrie.py 2025-04-11 11:37:48.987966786 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_Charset.py pyicu-2.15/test/test_Charset.py
|
|
--- pyicu-2.15.orig/test/test_Charset.py 2024-10-28 10:57:12.000000000 +0100
|
|
+++ pyicu-2.15/test/test_Charset.py 2025-04-11 11:37:48.988161345 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
@@ -59,7 +59,7 @@
|
|
def testUnicode(self):
|
|
|
|
bytes = u'beaut\xe9 probable'.encode('iso-8859-1')
|
|
- ustring = six.text_type(CharsetDetector(bytes).detect())
|
|
+ ustring = str(CharsetDetector(bytes).detect())
|
|
|
|
self.assertTrue(ustring.encode('iso-8859-1') == bytes)
|
|
|
|
diff -Nru pyicu-2.15.orig/test/test_Collator.py pyicu-2.15/test/test_Collator.py
|
|
--- pyicu-2.15.orig/test/test_Collator.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_Collator.py 2025-04-11 11:37:48.988362728 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
@@ -44,7 +44,7 @@
|
|
|
|
collator = Collator.createInstance(Locale.getFrance())
|
|
input = open(self.filePath('noms.txt'), 'rb')
|
|
- names = [six.text_type(n.strip(), 'utf-8') for n in input.readlines()]
|
|
+ names = [str(n.strip(), 'utf-8') for n in input.readlines()]
|
|
input.close()
|
|
ecole = names[0]
|
|
|
|
diff -Nru pyicu-2.15.orig/test/test_LayoutEngine.py pyicu-2.15/test/test_LayoutEngine.py
|
|
--- pyicu-2.15.orig/test/test_LayoutEngine.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_LayoutEngine.py 2025-04-11 11:37:48.988552187 +0200
|
|
@@ -22,7 +22,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_LocaleData.py pyicu-2.15/test/test_LocaleData.py
|
|
--- pyicu-2.15.orig/test/test_LocaleData.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_LocaleData.py 2025-04-11 11:37:48.988916789 +0200
|
|
@@ -22,7 +22,7 @@
|
|
#
|
|
# This is a python translation of ICU's LocaleDataTest.java
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
@@ -110,8 +110,8 @@
|
|
break
|
|
if existsInScript == False:
|
|
print_output("ExemplarSet containment failed for locale : "+ locale)
|
|
- print_output(locale + " exemplar " + repr(six.text_type(exemplarSets[0])))
|
|
- print_output(locale + " exemplar(case-folded) " + repr(six.text_type(exemplarSets[1])))
|
|
+ print_output(locale + " exemplar " + repr(str(exemplarSets[0])))
|
|
+ print_output(locale + " exemplar(case-folded) " + repr(str(exemplarSets[1])))
|
|
self.assertTrue(locale + " case-folded is a superset", exemplarSets[1].containsAll(exemplarSets[0]))
|
|
if (exemplarSets[1] == exemplarSets[0]):
|
|
++equalCount
|
|
@@ -156,10 +156,10 @@
|
|
if existsInScript == False and h == 0:
|
|
print_output("ExemplarSet containment failed for locale,option,type : " \
|
|
+ locale + "," + str(option) + "," + str(esType))
|
|
- print_output(locale + " exemplar(ES_STANDARD)" + repr(six.text_type(exemplarSets[0])))
|
|
- print_output(locale + " exemplar(ES_AUXILIARY)" + repr(six.text_type(exemplarSets[1])))
|
|
- print_output(locale + " exemplar(case-folded,ES_STANDARD)" + repr(six.text_type(exemplarSets[2])))
|
|
- print_output(locale + " exemplar(case-folded,ES_AUXILIARY)" + repr(six.text_type(exemplarSets[3])))
|
|
+ print_output(locale + " exemplar(ES_STANDARD)" + repr(str(exemplarSets[0])))
|
|
+ print_output(locale + " exemplar(ES_AUXILIARY)" + repr(str(exemplarSets[1])))
|
|
+ print_output(locale + " exemplar(case-folded,ES_STANDARD)" + repr(str(exemplarSets[2])))
|
|
+ print_output(locale + " exemplar(case-folded,ES_AUXILIARY)" + repr(str(exemplarSets[3])))
|
|
self.assertTrue(locale + " case-folded is a superset", exemplarSets[2].containsAll(exemplarSets[0]))
|
|
self.assertTrue(locale + " case-folder is a superset", exemplarSets[3].containsAll(exemplarSets[1]))
|
|
if (exemplarSets[2] == exemplarSets[0]):
|
|
diff -Nru pyicu-2.15.orig/test/test_LocaleMatcher.py pyicu-2.15/test/test_LocaleMatcher.py
|
|
--- pyicu-2.15.orig/test/test_LocaleMatcher.py 2024-10-29 11:06:30.000000000 +0100
|
|
+++ pyicu-2.15/test/test_LocaleMatcher.py 2025-04-11 11:37:48.989158288 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main, SkipTest
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_Locale.py pyicu-2.15/test/test_Locale.py
|
|
--- pyicu-2.15.orig/test/test_Locale.py 2023-04-14 20:45:50.000000000 +0200
|
|
+++ pyicu-2.15/test/test_Locale.py 2025-04-11 11:37:48.988729704 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_PythonReplaceable.py pyicu-2.15/test/test_PythonReplaceable.py
|
|
--- pyicu-2.15.orig/test/test_PythonReplaceable.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_PythonReplaceable.py 2025-04-11 11:37:48.989340013 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_Regex.py pyicu-2.15/test/test_Regex.py
|
|
--- pyicu-2.15.orig/test/test_Regex.py 2023-08-25 22:56:17.000000000 +0200
|
|
+++ pyicu-2.15/test/test_Regex.py 2025-04-11 11:37:48.990151824 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_Script.py pyicu-2.15/test/test_Script.py
|
|
--- pyicu-2.15.orig/test/test_Script.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_Script.py 2025-04-11 11:37:48.989518271 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
@@ -53,7 +53,7 @@
|
|
|
|
# iterating codepoints not UChar
|
|
names = [Script.getScript(cp).getShortName()
|
|
- for cp in six.text_type(pairs)]
|
|
+ for cp in str(pairs)]
|
|
if unicode_32bit:
|
|
self.assertEqual(['Latn', 'Deva', 'Hani', 'Hani'], names)
|
|
else:
|
|
@@ -83,10 +83,10 @@
|
|
self.assertEqual(str(u), char)
|
|
elif is_unicode_32bit():
|
|
self.assertEqual(len(char), 1)
|
|
- self.assertEqual(six.text_type(u), char)
|
|
+ self.assertEqual(str(u), char)
|
|
else:
|
|
self.assertEqual(len(char), 2)
|
|
- self.assertEqual(six.text_type(u), char)
|
|
+ self.assertEqual(str(u), char)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
diff -Nru pyicu-2.15.orig/test/test_TimeZone.py pyicu-2.15/test/test_TimeZone.py
|
|
--- pyicu-2.15.orig/test/test_TimeZone.py 2024-10-03 03:38:26.000000000 +0200
|
|
+++ pyicu-2.15/test/test_TimeZone.py 2025-04-11 11:37:48.989672705 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six, datetime
|
|
+import sys, os, datetime
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_Transliterator.py pyicu-2.15/test/test_Transliterator.py
|
|
--- pyicu-2.15.orig/test/test_Transliterator.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_Transliterator.py 2025-04-11 11:37:48.989846134 +0200
|
|
@@ -22,7 +22,7 @@
|
|
# ====================================================================
|
|
#
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
@@ -50,7 +50,7 @@
|
|
string = UnicodeString("Shang4hai3 zi4lai2shui3 lai2 zi4 hai3 shang4")
|
|
result = u'Sh\xe0ngh\u01cei z\xecl\xe1ishu\u01d0 l\xe1i z\xec h\u01cei sh\xe0ng'
|
|
|
|
- self.assertTrue(trans.transliterate(six.text_type(string)) == result)
|
|
+ self.assertTrue(trans.transliterate(str(string)) == result)
|
|
self.assertTrue(trans.transliterate(string) == result)
|
|
self.assertTrue(string == result)
|
|
|
|
diff -Nru pyicu-2.15.orig/test/test_UCharsTrie.py pyicu-2.15/test/test_UCharsTrie.py
|
|
--- pyicu-2.15.orig/test/test_UCharsTrie.py 2021-04-01 23:28:41.000000000 +0200
|
|
+++ pyicu-2.15/test/test_UCharsTrie.py 2025-04-11 11:37:48.989998022 +0200
|
|
@@ -21,7 +21,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|
|
diff -Nru pyicu-2.15.orig/test/test_UnicodeSet.py pyicu-2.15/test/test_UnicodeSet.py
|
|
--- pyicu-2.15.orig/test/test_UnicodeSet.py 2024-11-16 20:41:35.000000000 +0100
|
|
+++ pyicu-2.15/test/test_UnicodeSet.py 2025-04-11 11:38:05.928520422 +0200
|
|
@@ -20,7 +20,7 @@
|
|
# DEALINGS IN THE SOFTWARE.
|
|
# ====================================================================
|
|
|
|
-import sys, os, six
|
|
+import sys, os
|
|
|
|
from unittest import TestCase, main
|
|
from icu import *
|