%global _empty_manifest_terminate_build 0 Name: python-google-re2 Version: 1.0 Release: 1 Summary: RE2 Python bindings License: BSD License URL: https://github.com/google/re2 Source0: https://mirrors.nju.edu.cn/pypi/web/packages/09/16/d6c4dcb86fd0237407886f97621841d6decdf47fd62eb8ff1a823aa92cdb/google-re2-1.0.tar.gz %description A drop-in replacement for the re module. It uses RE2 under the hood, of course, so various PCRE features (e.g. backreferences, look-around assertions) are not supported. See https://github.com/google/re2/wiki/Syntax for the canonical reference, but known syntactic "gotchas" relative to Python are: * PCRE supports \Z and \z; RE2 supports \z; Python supports \z, but calls it \Z. You must rewrite \Z to \z in pattern strings. Known differences between this module's API and the re module's API: * The error class does not provide any error information as attributes. * The Options class replaces the re module's flags with RE2's options as gettable/settable properties. Please see re2.h for their documentation. * The pattern string and the input string do not have to be the same type. Any str will be encoded to UTF-8. * The pattern string cannot be str if the options specify Latin-1 encoding. Known issues with regard to building the C++ extension: * Building requires RE2 to be installed on your system. On Debian, for example, install the libre2-dev package. * Building requires pybind11 to be installed on your system OR venv. On Debian, for example, install the pybind11-dev package. For a venv, install the pybind11 package from PyPI. * Building on macOS is known to work, but has been known to fail. For example, the system Python may not know which compiler flags to set when building bindings for software installed by Homebrew; see https://docs.brew.sh/Homebrew-and-Python#brewed-python-modules. * Building on Windows has not been tested yet and will probably fail. %package -n python3-google-re2 Summary: RE2 Python bindings Provides: python-google-re2 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-google-re2 A drop-in replacement for the re module. It uses RE2 under the hood, of course, so various PCRE features (e.g. backreferences, look-around assertions) are not supported. See https://github.com/google/re2/wiki/Syntax for the canonical reference, but known syntactic "gotchas" relative to Python are: * PCRE supports \Z and \z; RE2 supports \z; Python supports \z, but calls it \Z. You must rewrite \Z to \z in pattern strings. Known differences between this module's API and the re module's API: * The error class does not provide any error information as attributes. * The Options class replaces the re module's flags with RE2's options as gettable/settable properties. Please see re2.h for their documentation. * The pattern string and the input string do not have to be the same type. Any str will be encoded to UTF-8. * The pattern string cannot be str if the options specify Latin-1 encoding. Known issues with regard to building the C++ extension: * Building requires RE2 to be installed on your system. On Debian, for example, install the libre2-dev package. * Building requires pybind11 to be installed on your system OR venv. On Debian, for example, install the pybind11-dev package. For a venv, install the pybind11 package from PyPI. * Building on macOS is known to work, but has been known to fail. For example, the system Python may not know which compiler flags to set when building bindings for software installed by Homebrew; see https://docs.brew.sh/Homebrew-and-Python#brewed-python-modules. * Building on Windows has not been tested yet and will probably fail. %package help Summary: Development documents and examples for google-re2 Provides: python3-google-re2-doc %description help A drop-in replacement for the re module. It uses RE2 under the hood, of course, so various PCRE features (e.g. backreferences, look-around assertions) are not supported. See https://github.com/google/re2/wiki/Syntax for the canonical reference, but known syntactic "gotchas" relative to Python are: * PCRE supports \Z and \z; RE2 supports \z; Python supports \z, but calls it \Z. You must rewrite \Z to \z in pattern strings. Known differences between this module's API and the re module's API: * The error class does not provide any error information as attributes. * The Options class replaces the re module's flags with RE2's options as gettable/settable properties. Please see re2.h for their documentation. * The pattern string and the input string do not have to be the same type. Any str will be encoded to UTF-8. * The pattern string cannot be str if the options specify Latin-1 encoding. Known issues with regard to building the C++ extension: * Building requires RE2 to be installed on your system. On Debian, for example, install the libre2-dev package. * Building requires pybind11 to be installed on your system OR venv. On Debian, for example, install the pybind11-dev package. For a venv, install the pybind11 package from PyPI. * Building on macOS is known to work, but has been known to fail. For example, the system Python may not know which compiler flags to set when building bindings for software installed by Homebrew; see https://docs.brew.sh/Homebrew-and-Python#brewed-python-modules. * Building on Windows has not been tested yet and will probably fail. %prep %autosetup -n google-re2-1.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-google-re2 -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 25 2023 Python_Bot - 1.0-1 - Package Spec generated