15
0
forked from pool/python-fb-re2

- Convert to pip-based build

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fb-re2?expand=0&rev=13
This commit is contained in:
2025-05-27 13:01:04 +00:00
committed by Git OBS Bridge
commit a8695a5e55
6 changed files with 144 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

12
cpp17.patch Normal file
View File

@@ -0,0 +1,12 @@
Index: pyre2-1.0.7/setup.py
===================================================================
--- pyre2-1.0.7.orig/setup.py
+++ pyre2-1.0.7/setup.py
@@ -21,6 +21,6 @@ setup(
ext_modules = [Extension("_re2",
sources = ["_re2.cc"],
libraries = ["re2"],
- extra_compile_args=['-std=c++11'],
+ extra_compile_args=['-std=c++17'],
)],
)

37
python-fb-re2.changes Normal file
View File

@@ -0,0 +1,37 @@
-------------------------------------------------------------------
Tue May 27 11:38:59 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Thu Mar 28 12:31:02 UTC 2024 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Thu Feb 22 08:33:37 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Fix tests on Python 3.12
-------------------------------------------------------------------
Thu Aug 3 11:02:39 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Add cpp17.patch to build in newer version of absl
gh#facebook/pyre2#25
-------------------------------------------------------------------
Wed May 19 09:09:13 UTC 2021 - pgajdos@suse.com
- use %pytest_arch macro in %check
-------------------------------------------------------------------
Tue Mar 12 15:11:50 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 1.0.7:
* initialize regexp field to preven nullptr free
- Run tests (switch to github tarball for them)
-------------------------------------------------------------------
Tue Dec 11 18:56:14 UTC 2018 - Thomas Bechtold <tbechtold@suse.com>
- Initial packaging (version 1.0.6)

68
python-fb-re2.spec Normal file
View File

@@ -0,0 +1,68 @@
#
# spec file for package python-fb-re2
#
# 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-fb-re2
Version: 1.0.7
Release: 0
Summary: Python wrapper for Google's RE2
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/facebook/pyre2
Source: https://github.com/facebook/pyre2/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM cpp17.patch gh#facebook/pyre2#25
Patch0: cpp17.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
BuildRequires: re2-devel
%python_subpackages
%description
Python wrapper for Google's RE2
%prep
%autosetup -p1 -n pyre2-%{version}
# fix tests on py312
sed -i 's/assertRaisesRegexp/assertRaisesRegex/g' tests/test_match.py
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitearch}/_re2*.so
%{python_sitearch}/re2.py
%{python_sitearch}/fb_re2-%{version}*-info
%pycache_only %{python_sitearch}/__pycache__
%changelog

3
v1.0.7.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:277a5ca0731c9e3f6c5996965380280117fb47e4091fe44d61bd417bcf401e02
size 11684