# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
%{!?python_version: %global python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")}

Name:       python-hachoir-regex
Version:    1.0.5
Release:    3%{?_dist_release}
Summary:    A python library for regular expression (regex or regexp) manupulation.

Group:      System Environment/Libraries
License:    GPLv2+
URL:        https://bitbucket.org/haypo/hachoir/wiki/hachoir-regex
Source0:    http://cheeseshop.python.org/packages/source/h/hachoir-regex/hachoir-regex-%{version}.tar.gz
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:  noarch

BuildRequires:  python-devel

Vendor: Project Vine
Distribution: Vine Linux

%description
choir-regex is a Python library for regular expression (regex or regexp)
manupulation. You can use a|b (or) and a+b (and) operators. Expressions are
optimized during the construction: merge ranges, simplify repetitions, etc.
It also contains a class for pattern matching allowing to search multiple
strings and regex at the same time.


%prep
%setup -q -n hachoir-regex-%{version}

%build
%{__python} ./setup.py build

%install
rm -rf %buildroot
%{__python} ./setup.py install --root $RPM_BUILD_ROOT

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,-)
%doc COPYING README AUTHORS
%{python_sitelib}/hachoir_regex/
%{python_sitelib}/hachoir_regex-%{version}-py%{python_version}.egg-info

%changelog
* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp 1.0.5-3
- rebuild with VineSeed environment

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp 1.0.5-2
- rebuild with python-2.7.2

* Fri Aug 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp 1.0.5-1
- initial build for Vine Linux
