2.11, patch for python 3.13

This commit is contained in:
Gwyn Ciesla 2023-10-24 11:33:30 -05:00
parent 9cbef64afd
commit 50826e1f07
5 changed files with 19 additions and 41 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@
/PyICU-2.7.3.tar.gz
/PyICU-2.9.tar.gz
/PyICU-2.10.2.tar.gz
/PyICU-2.11.tar.gz

View File

@ -1,36 +0,0 @@
--- common.cpp~ 2022-10-24 23:27:33.000000000 -0500
+++ common.cpp 2023-03-09 09:44:13.652450597 -0600
@@ -361,33 +361,6 @@
PyUnicode_READY(object);
switch (PyUnicode_KIND(object)) {
- case PyUnicode_WCHAR_KIND: { // this code path should be deprecated
- if (SIZEOF_WCHAR_T == sizeof(UChar))
- {
- Py_ssize_t len;
- wchar_t *wchars = PyUnicode_AsWideCharString(object, &len);
-
- if (wchars != NULL)
- {
- string.setTo((const UChar *) wchars, len);
- PyMem_Free(wchars);
- }
- }
- else if (SIZEOF_WCHAR_T == sizeof(UChar32))
- {
- Py_ssize_t len;
- wchar_t *wchars = PyUnicode_AsWideCharString(object, &len);
-
- if (wchars != NULL)
- {
- string = UnicodeString::fromUTF32(
- (const UChar32 *) wchars, len);
- PyMem_Free(wchars);
- }
- }
- break;
- }
-
case PyUnicode_1BYTE_KIND: {
Py_ssize_t len = PyUnicode_GET_LENGTH(object);
Py_UCS1 *pchars = PyUnicode_1BYTE_DATA(object);

10
py313.patch Normal file
View File

@ -0,0 +1,10 @@
--- locale.cpp~ 2023-04-14 13:45:50.000000000 -0500
+++ locale.cpp 2023-10-24 11:28:55.596502687 -0500
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#if defined(_MSC_VER) || defined(__WIN32)
#include <windows.h>

View File

@ -1,13 +1,13 @@
%define realname PyICU
Name: pyicu
Version: 2.10.2
Release: 7%{?dist}
Version: 2.11
Release: 1%{?dist}
Summary: Python extension wrapping the ICU C++ libraries
License: MIT
URL: https://pypi.org/project/PyICU/
Source0: https://files.pythonhosted.org/packages/source/P/%{realname}/%{realname}-%{version}.tar.gz
Patch0: py312.patch
Patch0: py313.patch
BuildRequires: gcc-c++
BuildRequires: libicu-devel
@ -32,7 +32,7 @@ Summary: Python 3 extension wrapping the ICU C++ libraries
%prep
%setup -q -n %{realname}-%{version}
%patch0 -p0
%patch -P 0 -p0
%build
%py3_build
@ -60,6 +60,9 @@ rm -rf %{buildroot}%{python3_sitearch}/tests
%{python3_sitearch}/icu/
%changelog
* Tue Oct 24 2023 Gwyn Ciesla <gwync@protonmail.com> - 2.11-1
- 2.11
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (PyICU-2.10.2.tar.gz) = 1ccb43496e1719314c2f1f81f6535cb57688917b19fdbc56b2773f9372f70160d69660a67f63fde3cee0384d7df649aad8539375be5c9be3ede8e1335a126bd7
SHA512 (PyICU-2.11.tar.gz) = d57ca2b29eafe336efca5285e10c9bfe1a6a1b575b3e52accd86a114ccf289bea0c004a5b26bd4e800211cca61df5aa1a11348a3f1dc73672b7b76dd971d6a25