From 11aaef6878bf4369550f2e9440b37cb0440865a53179025486cd8a8a1c70f2fc Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Feb 2025 14:24:44 +0000 Subject: [PATCH 1/2] Accepting request 1244693 from home:glaubitz:branches:devel:languages:python - Update to version 2.1.0 * Drop support for Python 3.6 and 3.7. Use older version for pre-built wheels. Note that it may work on these older version, we are just no longer supporting and testing these Python versions. * Add support for Python 3.12 - from version 2.0.0 * Drop support for Python 2 * Drop support for 32 bits OSes * Re-organize code such that sources are under src/, utilities under etc/ and tests are under tests/ * Use pytest for testing and streamline tests to use a more conventional Python approach * Build more compatible Linux wheels using "ci-build-wheel" - Restrict package to 64-bit architectures as 32-bit architectures are no longer supported upstream and the testsuite fails on these - Split off tests into separate -test package - Switch package to modern Python Stack on SLE-15 * Use Python 3.11 on SLE-15 by default * Drop support for older Python versions - Switch build system from setuptools to pyproject.toml * Add python-pip and python-wheel to BuildRequires * Replace %python_build with %pyproject_wheel * Replace %python_install with %pyproject_install OBS-URL: https://build.opensuse.org/request/show/1244693 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyahocorasick?expand=0&rev=10 --- _multibuild | 3 +++ pyahocorasick-1.4.4.tar.gz | 3 --- pyahocorasick-2.1.0.tar.gz | 3 +++ python-pyahocorasick.changes | 27 ++++++++++++++++++++++ python-pyahocorasick.spec | 43 ++++++++++++++++++++++++------------ 5 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 _multibuild delete mode 100644 pyahocorasick-1.4.4.tar.gz create mode 100644 pyahocorasick-2.1.0.tar.gz diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..6996b96 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/pyahocorasick-1.4.4.tar.gz b/pyahocorasick-1.4.4.tar.gz deleted file mode 100644 index e244ed3..0000000 --- a/pyahocorasick-1.4.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32545cad135660ceef556f1d987aee3206e00096735405d7a8de84eb0a15bb27 -size 95127 diff --git a/pyahocorasick-2.1.0.tar.gz b/pyahocorasick-2.1.0.tar.gz new file mode 100644 index 0000000..2de11d1 --- /dev/null +++ b/pyahocorasick-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4df4845c1149e9fa4aa33f0f0aa35f5a42957a43a3d6e447c9b44e679e2672ea +size 103259 diff --git a/python-pyahocorasick.changes b/python-pyahocorasick.changes index 39fb5c6..f600a8c 100644 --- a/python-pyahocorasick.changes +++ b/python-pyahocorasick.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Mon Feb 10 09:01:02 UTC 2025 - John Paul Adrian Glaubitz + +- Update to version 2.1.0 + * Drop support for Python 3.6 and 3.7. Use older version for + pre-built wheels. Note that it may work on these older version, + we are just no longer supporting and testing these Python versions. + * Add support for Python 3.12 +- from version 2.0.0 + * Drop support for Python 2 + * Drop support for 32 bits OSes + * Re-organize code such that sources are under src/, utilities + under etc/ and tests are under tests/ + * Use pytest for testing and streamline tests to use a more conventional + Python approach + * Build more compatible Linux wheels using "ci-build-wheel" +- Restrict package to 64-bit architectures as 32-bit architectures + are no longer supported upstream and the testsuite fails on these +- Split off tests into separate -test package +- Switch package to modern Python Stack on SLE-15 + * Use Python 3.11 on SLE-15 by default + * Drop support for older Python versions +- Switch build system from setuptools to pyproject.toml + * Add python-pip and python-wheel to BuildRequires + * Replace %python_build with %pyproject_wheel + * Replace %python_install with %pyproject_install + ------------------------------------------------------------------- Tue Oct 4 23:50:59 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-pyahocorasick.spec b/python-pyahocorasick.spec index 6f8d91e..887bb33 100644 --- a/python-pyahocorasick.spec +++ b/python-pyahocorasick.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyahocorasick # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,21 +16,35 @@ # -%define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-pyahocorasick -Version: 1.4.4 +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +%{?sle15_python_module_pythons} +Name: python-pyahocorasick%{?psuffix} +Version: 2.1.0 Release: 0 Summary: Library for exact or approximate multi-pattern string search License: BSD-3-Clause URL: https://github.com/WojciechMula/pyahocorasick Source: https://files.pythonhosted.org/packages/source/p/pyahocorasick/pyahocorasick-%{version}.tar.gz BuildRequires: %{python_module Cython} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +%if %{with test} +BuildRequires: %{python_module pyahocorasick = %{version}} +%endif BuildRequires: fdupes BuildRequires: gcc BuildRequires: python-rpm-macros +ExclusiveArch: aarch64 loongarch64 ppc64 ppc64le riscv64 s390x x86_64 %python_subpackages %description @@ -46,24 +60,25 @@ It is implemented in C. %prep %autosetup -p1 -n pyahocorasick-%{version} +%if !%{with test} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} - -%check -skip_tests="" -# gh#WojciechMula/pyahocorasick#142 -%ifarch ppc64 s390x armv7l -skip_tests+="not (test_iter2 or test_iter3)" %endif -%pytest_arch -k "${skip_tests}" unittests.py +%if %{with test} +%check +%pytest +%endif + +%if !%{with test} %files %{python_files} %doc README.rst %license LICENSE %{python_sitearch}/* +%endif %changelog From 9602a5734a3629642c554ee271750a2b69fb45bd6a73727d5578a53a6745473e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 11 Feb 2025 09:14:20 +0000 Subject: [PATCH 2/2] Accepting request 1244889 from home:glaubitz:branches:devel:languages:python - Enable %build section for test flavor - Limit Python files matched in %files section OBS-URL: https://build.opensuse.org/request/show/1244889 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyahocorasick?expand=0&rev=11 --- python-pyahocorasick.changes | 6 ++++++ python-pyahocorasick.spec | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-pyahocorasick.changes b/python-pyahocorasick.changes index f600a8c..73ee435 100644 --- a/python-pyahocorasick.changes +++ b/python-pyahocorasick.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 10 21:36:03 UTC 2025 - John Paul Adrian Glaubitz + +- Enable %build section for test flavor +- Limit Python files matched in %files section + ------------------------------------------------------------------- Mon Feb 10 09:01:02 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-pyahocorasick.spec b/python-pyahocorasick.spec index 887bb33..21d98de 100644 --- a/python-pyahocorasick.spec +++ b/python-pyahocorasick.spec @@ -60,11 +60,11 @@ It is implemented in C. %prep %autosetup -p1 -n pyahocorasick-%{version} -%if !%{with test} %build %pyproject_wheel %install +%if !%{with test} %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %endif @@ -78,7 +78,9 @@ It is implemented in C. %files %{python_files} %doc README.rst %license LICENSE -%{python_sitearch}/* +%{python_sitearch}/ahocorasick*.so +%{python_sitearch}/pyahocorasick-%{version}.dist-info + %endif %changelog