commit 6ba8ad42b97c3b3dfa3a65c2dd067d23ace52162bf3ecb910dfd92429e558a6d Author: Markéta Machová Date: Tue Mar 4 14:37:23 2025 +0000 Accepting request 1250071 from home:fstegmeier New package, new dependency for python-mkdocs-material OBS-URL: https://build.opensuse.org/request/show/1250071 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-backrefs?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/backrefs-5.8.tar.gz b/backrefs-5.8.tar.gz new file mode 100644 index 0000000..20e6e04 --- /dev/null +++ b/backrefs-5.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cab642a205ce966af3dd4b38ee36009b31fa9502a35fd61d59ccc116e40a6bd +size 6773994 diff --git a/python-backrefs.changes b/python-backrefs.changes new file mode 100644 index 0000000..fa727e4 --- /dev/null +++ b/python-backrefs.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Mar 3 10:03:40 UTC 2025 - Felix Stegmeier + +- initial version 5.8 diff --git a/python-backrefs.spec b/python-backrefs.spec new file mode 100644 index 0000000..b379fe6 --- /dev/null +++ b/python-backrefs.spec @@ -0,0 +1,72 @@ +# +# spec file for package python-backrefs +# +# 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/ +# + + +Name: python-backrefs +Version: 5.8 +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-rpm-macros +BuildRequires: %{python_module hatchling >= 0.21.1} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module regex} +BuildRequires: fdupes +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