Blob Blame History Raw
%{!?_licensedir: %global license %%doc}

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2:        %global __python2 /usr/bin/python2}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif


Name:               python-re2
Version:            1.0.5
Release:            1%{?dist}
Summary:            Python wrapper for Google's RE2 library

Group:              Development/Libraries
License:            BSD
URL:                https://github.com/facebook/pyre2
Source0:            https://pypi.io/packages/source/f/fb-re2/fb-re2-%{version}.tar.gz

BuildRequires:      python2-devel
BuildRequires:      re2-devel
BuildRequires:      python-nose

Requires:           re2

%description
python-re2 is a Python extension that wraps Google's RE2 regular expression
library.

This is Facebook's pyre2 Python extension that wraps Google's RE2 regular
expression library. It implements many of the features of Python's built-in re
module with compatible interfaces.


%prep
%setup -q -n fb-re2-%{version}

# Remove bundled egg-info in case it exists
rm -rf re2.egg-info

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build

%install
%{__python2} setup.py install --skip-build --root=%{buildroot}

%check
PYTHONPATH=%{buildroot}/%{python2_sitearch} %{__python2} /usr/bin/nosetests

%files
%doc README.rst
%license LICENSE
%{python2_sitearch}/re2.py*
%{python2_sitearch}/_re2.so
%{python2_sitearch}/fb_re2-%{version}*.egg-info


%changelog
* Sun Oct 09 2016 Mads Kiilerich <mads@kiilerich.com> - 1.0.5-1
- python-re2 1.0.5

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Apr 14 2015 Mads Kiilerich <mads@kiilerich.com> - 1.0.4-1
- change from the axiak/pyre2 fork back to the upstream facebook/pyre2
- enable tests

* Thu Feb 12 2015 Ralph Bean <rbean@redhat.com> - 0.2.20-2.20150211git382bb74
- Move to a post-release git checkout to include various bugfixes.
- Remove rpath settings.
- Use Cython for the build.

* Wed Feb 11 2015 Ralph Bean <rbean@redhat.com> - 0.2.20-1
- initial package for Fedora