| |
@@ -1,6 +1,4 @@
|
| |
- %bcond_without tests
|
| |
-
|
| |
- %global pypi_name datrie
|
| |
+ %bcond tests 1
|
| |
|
| |
%global _description %{expand:
|
| |
The library implements the Trie data structure. The trie variable is a
|
| |
@@ -12,94 +10,59 @@
|
| |
items whose keys are prefixes of a given string. As a common special case,
|
| |
finding the longest-prefix item is also supported.}
|
| |
|
| |
- Name: python-%{pypi_name}
|
| |
+ Name: python-datrie
|
| |
Version: 0.8.2
|
| |
- Release: 10%{?dist}
|
| |
+ Release: %autorelease
|
| |
Summary: Super-fast, efficiently stored Trie for Python
|
| |
|
| |
- License: LGPLv2
|
| |
- URL: https://github.com/pytries/%{pypi_name}
|
| |
- Source0: %{pypi_source}
|
| |
- # Patch to correctly decode on big/little endian systems
|
| |
+ License: LGPL-2.1-or-later
|
| |
+ URL: https://github.com/pytries/datrie
|
| |
+ Source: %{pypi_source datrie}
|
| |
+ # BUGFIX: Decode string based on byteorder of system
|
| |
+ # https://github.com/pytries/datrie/pull/85
|
| |
+ #
|
| |
+ # Fixes:
|
| |
+ #
|
| |
+ # UnicodeDecodeError: 'utf32' codec can't decode bytes in position 0-3: code
|
| |
+ # point not in range(0x110000)
|
| |
# https://github.com/pytries/datrie/issues/38
|
| |
- Patch0: 0001-BUG-Decode-string-based-on-byteorder-of-system.patch
|
| |
+ Patch: https://github.com/pytries/datrie/pull/85.patch
|
| |
|
| |
- %description %_description
|
| |
+ BuildRequires: python3-devel
|
| |
|
| |
- %package -n python3-%{pypi_name}
|
| |
- Summary: %{summary}
|
| |
BuildRequires: gcc-c++
|
| |
BuildRequires: libdatrie
|
| |
- BuildRequires: python3-devel
|
| |
- BuildRequires: %{py3_dist Cython}
|
| |
- BuildRequires: %{py3_dist setuptools}
|
| |
|
| |
- %if %{with tests}
|
| |
- BuildRequires: %{py3_dist pytest}
|
| |
- BuildRequires: %{py3_dist pytest-runner}
|
| |
- BuildRequires: %{py3_dist hypothesis}
|
| |
- %endif
|
| |
+ %description %_description
|
| |
|
| |
- %py_provides python3-%{pypi_name}
|
| |
+ %package -n python3-datrie
|
| |
+ Summary: %{summary}
|
| |
|
| |
- %description -n python3-%{pypi_name} %_description
|
| |
+ %description -n python3-datrie %_description
|
| |
|
| |
%prep
|
| |
- %autosetup -p1 -n %{pypi_name}-%{version}
|
| |
- rm -rf %{pypi_name}.egg-info
|
| |
+ %autosetup -p1 -n datrie-%{version}
|
| |
|
| |
# use system's libdatrie
|
| |
- sed -i -e 's/..\/libdatrie\///g' src/cdatrie.pxd
|
| |
+ sed -r -i -e 's@\.\./libdatrie/@@g' src/cdatrie.pxd
|
| |
|
| |
- find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
|
| |
+ %generate_buildrequires
|
| |
+ %pyproject_buildrequires -t
|
| |
|
| |
%build
|
| |
- %py3_build
|
| |
+ %pyproject_wheel
|
| |
|
| |
%install
|
| |
- %py3_install
|
| |
+ %pyproject_install
|
| |
+ %pyproject_save_files datrie
|
| |
|
| |
%check
|
| |
%if %{with tests}
|
| |
- export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
| |
- pytest-%{python3_version}
|
| |
+ %tox
|
| |
%endif
|
| |
|
| |
- %files -n python3-%{pypi_name}
|
| |
+ %files -n python3-datrie -f %{pyproject_files}
|
| |
%doc README.rst
|
| |
- %license COPYING
|
| |
-
|
| |
- %{python3_sitearch}/datrie.cpython-*.so
|
| |
- %{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
| |
-
|
| |
|
| |
%changelog
|
| |
- * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-10
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
| |
-
|
| |
- * Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.8.2-9
|
| |
- - Rebuilt for Python 3.12
|
| |
-
|
| |
- * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-8
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
-
|
| |
- * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-7
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
| |
-
|
| |
- * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.2-6
|
| |
- - Rebuilt for Python 3.11
|
| |
-
|
| |
- * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-5
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
| |
-
|
| |
- * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-4
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
-
|
| |
- * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.2-3
|
| |
- - Rebuilt for Python 3.10
|
| |
-
|
| |
- * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-2
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
-
|
| |
- * Sat Nov 21 2020 Aniket Pradhan <major AT fedoraproject DOT org> - 0.8.2-1
|
| |
- - Initial build
|
| |
+ %autochangelog
|
| |
Full details in the changelog messages.
Happy to drop
rpmautospec
if you dislike it. The rest should be uncontroversial, I think.