%global with_python3 1
Name: python-http-parser
Version: 0.8.3
Release: 7%{?dist}
Summary: HTTP request/response parser for Python
License: MIT
URL: https://github.com/benoitc/http-parser/
Source0: http://pypi.python.org/packages/source/h/http-parser/http-parser-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
%filter_provides_in %{python_sitearch}/http_parser/parser.so
%filter_setup
%description
HTTP request/response parser for Python compatible with Python 2.x
(>=2.5.4), Python 3 and Pypy. If possible a C parser based on
http-parser_ from Ryan Dahl will be used.
%if 0%{?with_python3}
%package -n python3-http-parser
Summary: HTTP request/response parser for Python 3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-http-parser
HTTP request/response parser for Python compatible with Python 2.x
(>=2.5.4), Python 3 and Pypy. If possible a C parser based on
http-parser_ from Ryan Dahl will be used.
This package contains Python 3 build of http-parser.
%endif
%prep
%setup -q -n http-parser-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%files
%doc LICENSE README.rst
%{python_sitearch}/http_parser*
%if 0%{?with_python3}
%files -n python3-http-parser
%doc LICENSE README.rst
%{python3_sitearch}/http_parser*
%endif
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 15 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.8.3-5
- Introduced python3 subpackage
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Sep 26 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.8.3-1
- Update to 0.8.3.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.12-1
- Update to 0.7.12.
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Mar 15 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.5-2
- Removed unneeded rm -rf %%{buildroot}.
- Placed all files under the %%{python_sitearch}.
- Filtered provide of the .so file.
* Thu Mar 15 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.5-1
- Initial package.