# # spec file for package python-regex # # 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-regex Version: 2024.11.6 Release: 1.3 Summary: Alternative regular expression module for Python License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/mrabarnett/mrab-regex Source: https://files.pythonhosted.org/packages/source/r/regex/regex-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-testsuite %python_subpackages %description An alternate regex implementation. It differs from "re" in that * Zero-width matches are handled like in Perl and PCRE: * ``.split`` will split a string at a zero-width match. * ``.sub`` will handle zero-width matches correctly. * Inline flags apply to the end of the group or pattern, and they can be turned off. * Nested sets and set operations are supported. * Case-insensitive matches in Unicode use full case-folding by default. %prep %setup -q -n regex-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check export PYTHONDONTWRITEBYTECODE=1 # test_main invokes unittest.main, which raises SystemExit, which fails on pytest. %pytest_arch %{buildroot}%{$python_sitearch}/regex -k 'not test_main' %files %{python_files} %license LICENSE.txt %doc README.rst %doc docs %{python_sitearch}/regex %{python_sitearch}/regex-%{version}.dist-info %changelog * Thu Jan 9 2025 Nico Krapp - Update to 2024.11.06: * Git issue 546: Partial match not working in some instances with non-greedy capture - from 2024.9.14: * Reverted to actions/download-artifact@v3 and actions/upload-artifact@v3 in main.yml because GitHub Actions failed when using them. - from 2024.9.13: * Updated to actions/upload-artifact@v4 in main.yml. - from 2024.9.12: * Updated to actions/download-artifact@v4 in main.yml. - from 2024.9.11: * Updated to Unicode 16.0.0. - from 2024.7.24: * Git issue 539: Bug: Partial matching fails on a simple example - from 2024.6.22: * Git issue 535: Regex fails Unicode 15.1 GraphemeBreakTest due to missing new GB9c rule implementation * Thu Jun 6 2024 Dirk Müller - update to 2024.5.15: * fix hangs with fuzzy and optionals * Updated for Python 3.13. * Thu May 2 2024 Dirk Müller - update to 2024.4.28: * Git issue 527: `VERBOSE`/`X` flag breaks `\N` escapes * Sat Apr 20 2024 Dirk Müller - updatge to 2024.4.16: * Git issue 525: segfault when fuzzy matching empty list * The escape function no longer escapes \x00. It's not necessary. Inline flags can now be turned off and apply to what follows. Added \R to match line endings. * Mon Dec 4 2023 Dirk Müller - update to 2023.10.10: * Updated to Unicode 15.1.0. * Thu Sep 7 2023 Johannes Kastl - update to 2023.8.8: * Git issue 508: Regex doesn't build using CPython main (3.13.0a0) * Removed usage of _PyBytes_Join and did a little tidying of the code that makes the result string. * Thu Sep 7 2023 Johannes Kastl - update to 2023.6.3: * Git issue 498: Conditional negative lookahead inside positive lookahead fails to match * Conditional node needed an additional member that points to the true branch. * Sun May 14 2023 Dirk Müller - update to 2023.5.5: * Removed semicolon after 'else' in 'munge_name'. * Fixed pyproject.toml and setup.py. * pyproject.toml was missing. * Added pyproject.toml. * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Mon Mar 27 2023 Dirk Müller - update to 2023.3.23: * Backtracking failure matching regex * Limit running time for failing fullmatch * Wed Nov 9 2022 Yogalakshmi Arunachalam - update to 2022.10.31 * Updated text for supported Unicode and Python versions. * Fri Sep 16 2022 Dirk Müller - update to 2022.9.13: * update to unicode 15.0 * Mon Sep 12 2022 Dirk Müller - update to 2022.9.11: * fix issue 474: regex has no equivalent to re.Match.groups() for captures * fix segmentation fault when using conditional pattern (issue 479) * use \v for vertical spacing * Sun Jul 17 2022 Dirk Müller - update to 2022.7.9: * Fix Emoji classified as letter * Revisit compilation flag to prevent adding a single explicitly compiled regex to cache * Fix Scoped inline flags 'a', 'u', and 'L' affecting global flags * Tue Jun 14 2022 Yogalakshmi Arunachalam - Update to 2022.6.2 * No upstream changelog available * Tue May 24 2022 Alberto Planas Dominguez - Update to 2022.4.24 * Many fixes, including drop of Python 2 and improvement of fuzzy test coverage * Sun Aug 1 2021 Dirk Müller - update to 2021.7.6: * drop-in replacement for python re * fix fuzzy character restrictions not applying to insertions * Sun May 9 2021 Dirk Müller - update to 2021.4.4: * Wheels for arm64 mac os * Fix fuzzy matching with wrong distance * Fix regex fails with a quantified backreference * Sat Mar 13 2021 Dirk Müller - update to 2020.11.13: * Fix Unexpected behavior in fuzzy matching with limited character set * clock() calls for timeout cause slowdown in Docker * Update lis of supported Python versions * licensing change to Apache-2.0 * Wed Oct 7 2020 John Vandenberg - Update to 2020.9.27 * Fuzzy-matching fixes * Fix Memory Error in regex.findall * Added \h as an alias to [[:blank:]]. * Improved performance of string sets. * Wed Apr 15 2020 Marketa Calabkova - update to 2020.4.4 * Updated to Unicode 13.0.0. * Thu Mar 19 2020 pgajdos@suse.com - version update to 2020.2.20 * no upstream changelog found * Tue Sep 10 2019 Tomáš Chvátal - Update to 2019.08.19: * minor fixes * Mon Jul 22 2019 Tomáš Chvátal - Update to 2019.06.08: * minor fixes * Wed Jun 5 2019 Marketa Calabkova - Update to 2019.06.05 * Updated for Python 3.8. * Updated to Unicode 12.1.0. * For fullmatch, added check for end/start of string for RE_OP_SUCCESS in try_match. * Tue May 14 2019 Tomáš Chvátal - Update to 2019.04.14: * no upstream changelog provided * Mon Jul 2 2018 toddrme2178@gmail.com - Update to 2018.06.21 * Fixed Regex matches with `re` but not with `regex` module * Fixed that the reported positions of fuzzy changes were sometimes incorrect. * Updated Unicode word and grapheme boundaries for Unicode 11.0.0, which I had overlooked... * Updated to Unicode 11.0.0. * Fixed an off-by-one bug where a lazy repeat is followed by a character (quick check). * Fixed that the Unicode normalization quick check properties weren't handled correctly. * Further changes to match re module's behaviour on zero-width matching for Python 3.7. * Added 'fuzzy_changes' attribute to match object to indicate positions of changes in fuzzy match. * Sat Sep 2 2017 jengelh@inai.de - Specify in description what makes regex worthwhile to have. Fix RPM group. * Thu Aug 31 2017 toddrme2178@gmail.com - Update to 2017.07.28 * Too many changes to list * Thu Aug 24 2017 jmatejek@suse.com - singlespec auto-conversion * Fri Jun 16 2017 ecsos@opensuse.org - Update to 2017.06.07 * Too many changes to list * Sat Sep 17 2016 toddrme2178@gmail.com - Update to 2016.08.27 * Too many changes to list - Complete rewrite of the .spec file. * Wed May 9 2012 froh@suse.com - update to current version 0.1.20120506 * Tue Oct 4 2011 jw@suse.com - initial pull from pypi