py 3.12
This commit is contained in:
parent
88265b9134
commit
9bc6e34155
|
@ -0,0 +1,36 @@
|
||||||
|
--- 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
pyicu.spec
10
pyicu.spec
|
@ -1,12 +1,13 @@
|
||||||
%define realname PyICU
|
%define realname PyICU
|
||||||
Name: pyicu
|
Name: pyicu
|
||||||
Version: 2.10.2
|
Version: 2.10.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Python extension wrapping the ICU C++ libraries
|
Summary: Python extension wrapping the ICU C++ libraries
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.org/project/PyICU/
|
URL: https://pypi.org/project/PyICU/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/P/%{realname}/%{realname}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/P/%{realname}/%{realname}-%{version}.tar.gz
|
||||||
|
Patch0: py312.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libicu-devel
|
BuildRequires: libicu-devel
|
||||||
|
@ -31,6 +32,8 @@ Summary: Python 3 extension wrapping the ICU C++ libraries
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{realname}-%{version}
|
%setup -q -n %{realname}-%{version}
|
||||||
|
|
||||||
|
%patch0 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
@ -54,11 +57,12 @@ rm -rf %{buildroot}%{python3_sitearch}/tests
|
||||||
%files -n python3-pyicu
|
%files -n python3-pyicu
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{python3_sitearch}/PyICU*
|
%{python3_sitearch}/PyICU*
|
||||||
#%{python3_sitearch}/__pycache__/PyICU*
|
|
||||||
%{python3_sitearch}/icu/
|
%{python3_sitearch}/icu/
|
||||||
#%{python3_sitearch}/_icu*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 09 2023 Gwyn Ciesla <gwync@protonmail.com> - 2.10.2-4
|
||||||
|
- Patch for Python 3.12.
|
||||||
|
|
||||||
* Fri Mar 03 2023 Gwyn Ciesla <gwync@protonmail.com> - 2.10.2-3
|
* Fri Mar 03 2023 Gwyn Ciesla <gwync@protonmail.com> - 2.10.2-3
|
||||||
- migrated to SPDX license
|
- migrated to SPDX license
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue