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:            9%{?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:      gcc-c++
BuildRequires:      python2-devel
BuildRequires:      re2-devel
BuildRequires:      python2-nose

%global _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.\


%description %_description

%package -n python2-re2
Summary: %summary
Requires:           re2
%{?python_provide:%python_provide python2-re2}

%description -n python2-re2 %_description

%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 -n python2-re2
%doc README.rst
%license LICENSE
%{python2_sitearch}/re2.py*
%{python2_sitearch}/_re2.so
%{python2_sitearch}/fb_re2-%{version}*.egg-info


%changelog
* Mon Jul 16 2018 Mads Kiilerich <mads@kiilerich.com> - 1.0.5-9
- Fix build failure - make gcc-c++ dependency explicit

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.5-7
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.5-5
- Python 2 binary package renamed to python2-re2
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* 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