* **NEW**: Include Unicode 17 zip for early Python 3.15 usage,
though Python 3.15 functionality is not guaranteed.
* **FIX**: Fix issues with regex imports in later versions.
* **FIX**: Fix a regression that created an ASCII binary
property that would override the ASCII block property.
* **NEW**: POSIX character classes will now always use POSIX
compatibility rules instead of Unicode standard rules,
* if any are specified in the Unicode specification. The
affected character classes are: `[[:alnum:]]`, `[[:digit:]]`,
* `[[:xdigit:]]`, and `[[:punct:]]`. To explicitly use
standard Unicode rules for these compatibility properties,
use
* the Unicode property form instead: `[\p{Alnum}]`,
`[\p{Digit}]`, `[\p{Punct}]`, or `[\p{XDigit}]`. This has
changed
* to ensure no confusion for users expecting compatible POSIX
style character class properties.
* **FIX**: Scoped ASCII/Unicode flags
(`(?a:pattern)`/`(?u:pattern)`) should be respected for
Unicode properties in
* `bre` and will ensure ASCII or Unicode range if used.
* **FIX**: Fix issues related to detecting disabled scoped
flags.
- initial version 5.8
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-backrefs?expand=0&rev=6
74 lines
2.4 KiB
RPMSpec
74 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-backrefs
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# 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-backrefs
|
|
Version: 6.1
|
|
Release: 0
|
|
Summary: A wrapper around re and regex that adds additional back references
|
|
License: MIT
|
|
URL: https://github.com/facelessuser/backrefs
|
|
Source: https://files.pythonhosted.org/packages/source/b/backrefs/backrefs-%{version}.tar.gz
|
|
BuildRequires: %{python_module hatchling >= 0.21.1}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module regex}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Suggests: python-regex
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Backrefs is a wrapper around Python's built-in [Re][re] and the 3rd party [Regex][regex] library. Backrefs adds various
|
|
additional back references (and a couple other features) that are known to some regular expression engines, but not to
|
|
Python's Re and/or Regex. The supported back references actually vary depending on the regular expression engine being
|
|
used as the engine may already have support for some.
|
|
|
|
```python
|
|
from backrefs import bre
|
|
>>> pattern = bre.compile(r'(\p{Letter}+)')
|
|
>>> pattern.sub(r'\C\1\E', 'sometext')
|
|
'SOMETEXT'
|
|
```
|
|
|
|
%prep
|
|
%autosetup -p1 -n backrefs-%{version}
|
|
# Fix build, remove build_data["tag"] to do not override the wheel
|
|
# filename, python-rpm-macros rely on the standard naming for multiflavor
|
|
sed -i '/build_data\[/d' hatch_build.py
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE.md LICENSE.md
|
|
%{python_sitelib}/backrefs
|
|
%{python_sitelib}/backrefs-%{version}.dist-info
|
|
|
|
%changelog
|