From 7b31e30873a703429ab70e098a5ad03e0ef9f001 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Apr 14 2015 21:07:56 +0000 Subject: change from the axiak/pyre2 fork back to the upstream facebook/pyre2 - enable tests --- diff --git a/.gitignore b/.gitignore index 617c889..55d2975 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ /pyre2-382bb743f16722b582cc2bac8fc08ff121dec20e.tar.gz +/fb-re2-1.0.0.tar.gz +/fb-re2-1.0.1.tar.gz +/fb-re2-1.0.2.tar.gz +/fb-re2-1.0.3.tar.gz +/fb-re2-1.0.4.tar.gz diff --git a/python-re2.spec b/python-re2.spec index 66d839a..a8a00d8 100644 --- a/python-re2.spec +++ b/python-re2.spec @@ -5,30 +5,22 @@ %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif -%global commit 382bb743f16722b582cc2bac8fc08ff121dec20e -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global checkout 20150211git%{shortcommit} - -%global gh_owner axiak -%global gh_project pyre2 - -%global modname re2 - +%global pypiname fb-re2 Name: python-re2 -Version: 0.2.20 -Release: 2.%{checkout}%{?dist} -Summary: Python wrapper for Google's RE2 using Cython +Version: 1.0.4 +Release: 1%{?dist} +Summary: Python wrapper for Google's RE2 library Group: Development/Libraries License: BSD -URL: http://pypi.python.org/pypi/re2 -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{commit}/%{gh_project}-%{commit}.tar.gz +URL: https://github.com/facebook/pyre2 +Source0: https://pypi.python.org/packages/source/f/fb-re2/fb-re2-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: re2-devel -BuildRequires: Cython +BuildRequires: python-nose Requires: re2 @@ -36,36 +28,39 @@ Requires: re2 python-re2 is a Python extension that wraps Google's RE2 regular expression library. -This version of python-re2 is similar to the one you'd find at facebook's -github repository except that the stated goal of this version is to be a -drop-in replacement for the stdlib re module. +This is Facebook's pyre2 is a 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 %{gh_project}-%{commit} -# Strip rpath stuff -sed -i 's/runtime_library_dirs/#runtime_library_dirs/' setup.py +%prep +%setup -q -n fb-re2-%{version} # Remove bundled egg-info in case it exists -rm -rf %{modname}.egg-info +rm -rf re2.egg-info %build -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py --cython build +CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %install -%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} +%{__python2} setup.py install --skip-build --root=%{buildroot} -## Tests don't run currently -#%%check -#%%{__python2} setup.py test +%check +PYTHONPATH=%{buildroot}/%{python2_sitearch} %{__python2} /usr/bin/nosetests %files -%doc README.rst AUTHORS CHANGELIST +%doc README.rst %license LICENSE -%{python2_sitearch}/%{modname}.so -%{python2_sitearch}/%{modname}-%{version}*.egg-info +%{python2_sitearch}/re2.py* +%{python2_sitearch}/_re2.so +%{python2_sitearch}/fb_re2-%{version}*.egg-info + %changelog +* Tue Apr 14 2015 Mads Kiilerich - 1.0.4-1 +- change from the axiak/pyre2 fork back to the upstream facebook/pyre2 +- enable tests + * Thu Feb 12 2015 Ralph Bean - 0.2.20-2.20150211git382bb74 - Move to a post-release git checkout to include various bugfixes. - Remove rpath settings. diff --git a/sources b/sources index e638d63..36bc0be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -de4caba3c1cdd4238d70533cdda98906 pyre2-382bb743f16722b582cc2bac8fc08ff121dec20e.tar.gz +38281bae170e99f1cc3b1824a5cc1151 fb-re2-1.0.4.tar.gz