[python-re2] Initial import (#1191808)

Ralph Bean ralph at fedoraproject.org
Thu Feb 12 19:46:33 UTC 2015


commit 4a35c6018b6e663e03fbff0f5e0951c903c5a462
Author: Ralph Bean <rbean at redhat.com>
Date:   Thu Feb 12 14:46:18 2015 -0500

    Initial import (#1191808)

 .gitignore      |    1 +
 python-re2.spec |   75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 3 files changed, 77 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..617c889 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyre2-382bb743f16722b582cc2bac8fc08ff121dec20e.tar.gz
diff --git a/python-re2.spec b/python-re2.spec
new file mode 100644
index 0000000..66d839a
--- /dev/null
+++ b/python-re2.spec
@@ -0,0 +1,75 @@
+%{!?_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
+
+%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
+
+
+
+Name:               python-re2
+Version:            0.2.20
+Release:            2.%{checkout}%{?dist}
+Summary:            Python wrapper for Google's RE2 using Cython
+
+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
+
+BuildRequires:      python2-devel
+BuildRequires:      re2-devel
+BuildRequires:      Cython
+
+Requires:           re2
+
+%description
+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.
+
+%prep
+%setup -q -n %{gh_project}-%{commit}
+
+# Strip rpath stuff
+sed -i 's/runtime_library_dirs/#runtime_library_dirs/' setup.py
+
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py --cython build
+
+%install
+%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+
+## Tests don't run currently
+#%%check
+#%%{__python2} setup.py test
+
+%files
+%doc README.rst AUTHORS CHANGELIST
+%license LICENSE
+%{python2_sitearch}/%{modname}.so
+%{python2_sitearch}/%{modname}-%{version}*.egg-info
+
+%changelog
+* Thu Feb 12 2015 Ralph Bean <rbean at 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 at redhat.com> - 0.2.20-1
+- initial package for Fedora
diff --git a/sources b/sources
index e69de29..e638d63 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+de4caba3c1cdd4238d70533cdda98906  pyre2-382bb743f16722b582cc2bac8fc08ff121dec20e.tar.gz


More information about the scm-commits mailing list