a34c99c
# Created by pyp2rpm-3.3.2
a34c99c
%global pypi_name hpack
8b2bec7
%global with_tests 0
8b2bec7
8b2bec7
%global with_python2 1
8b2bec7
8b2bec7
%if 0%{?rhel} && 0%{?rhel} >= 8
8b2bec7
%global with_python2 0
8b2bec7
%endif
8b2bec7
a34c99c
a34c99c
%global common_description %{expand:
a34c99c
HTTP/2 Header Encoding for Python This module contains a pure-Python
a34c99c
HTTP/2 header encoding (HPACK) logic for use in Python programs that implement
a34c99c
HTTP/2. It also contains a compatibility layer that automatically enables the
a34c99c
use of nghttp2 if it's available.}
a34c99c
a34c99c
Name:           python-%{pypi_name}
a34c99c
Version:        3.0.0
8b2bec7
Release:        5%{?dist}.1
a34c99c
Summary:        Pure-Python HPACK header compression
a34c99c
a34c99c
License:        MIT
a34c99c
URL:            http://hyper.rtfd.org
b8c7cc3
Source0:        https://github.com/python-hyper/hpack/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
a34c99c
BuildArch:      noarch
a34c99c
 
8b2bec7
%if 0%{?with_python2}
a34c99c
BuildRequires:  python2-devel
a34c99c
BuildRequires:  python2dist(setuptools)
b8c7cc3
BuildRequires:  python2dist(pytest)
b8c7cc3
BuildRequires:  python2dist(hypothesis)
8b2bec7
%endif
8b2bec7
a34c99c
BuildRequires:  python3-devel
a34c99c
BuildRequires:  python3dist(setuptools)
b8c7cc3
BuildRequires:  python3dist(pytest)
b8c7cc3
BuildRequires:  python3dist(hypothesis)
a34c99c
a34c99c
%{?python_enable_dependency_generator}
a34c99c
a34c99c
%description
a34c99c
%{common_description}
a34c99c
a34c99c
8b2bec7
%if 0%{?with_python2}
a34c99c
%package -n     python2-%{pypi_name}
a34c99c
Summary:        %{summary}
a34c99c
%{?python_provide:%python_provide python2-%{pypi_name}}
a34c99c
a34c99c
%description -n python2-%{pypi_name}
a34c99c
%{common_description}
8b2bec7
%endif
a34c99c
a34c99c
a34c99c
%package -n     python3-%{pypi_name}
a34c99c
Summary:        %{summary}
a34c99c
%{?python_provide:%python_provide python3-%{pypi_name}}
a34c99c
a34c99c
%description -n python3-%{pypi_name}
a34c99c
%{common_description}
a34c99c
a34c99c
a34c99c
%prep
a34c99c
%autosetup -n %{pypi_name}-%{version}
a34c99c
# Remove bundled egg-info
a34c99c
rm -rf %{pypi_name}.egg-info
b8c7cc3
rm -rf bench
a34c99c
a34c99c
a34c99c
%build
8b2bec7
%if 0%{?with_python2}
a34c99c
%py2_build
8b2bec7
%endif
a34c99c
%py3_build
a34c99c
a34c99c
a34c99c
%install
8b2bec7
%if 0%{?with_python2}
a34c99c
%py2_install
8b2bec7
%endif
a34c99c
%py3_install
a34c99c
a34c99c
8b2bec7
%if 0%{?with_tests}
a34c99c
%check
8b2bec7
%if 0%{?with_python2}
b8c7cc3
%{__python2} -m pytest
8b2bec7
%endif
b8c7cc3
%{__python3} -m pytest
8b2bec7
%endif # with_tests
a34c99c
a34c99c
8b2bec7
%if 0%{?with_python2}
a34c99c
%files -n python2-%{pypi_name}
a34c99c
%license LICENSE
a34c99c
%doc README.rst
a34c99c
%{python2_sitelib}/%{pypi_name}
a34c99c
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
8b2bec7
%endif
a34c99c
a34c99c
%files -n python3-%{pypi_name}
a34c99c
%license LICENSE
a34c99c
%doc README.rst
a34c99c
%{python3_sitelib}/%{pypi_name}
a34c99c
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
a34c99c
a34c99c
a34c99c
%changelog
8b2bec7
* Wed Jul 24 2019 Stephen Smoogen <smooge@fedoraproject.org> - 3.0.0-5.1
8b2bec7
- Make python2 optional
8b2bec7
8b2bec7
* Mon Jun 24 2019 Troy Dawson <tdawson@redhat.com> - 3.0.0-5.1
8b2bec7
- Turn off tests for initial EPEL8 build
8b2bec7
b8c7cc3
* Thu Mar 07 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.0-5
b8c7cc3
- Add actual tests
b8c7cc3
37d0b62
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-4
37d0b62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
37d0b62
2040eef
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-3
2040eef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2040eef
6055744
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.0.0-2
6055744
- Rebuilt for Python 3.7
6055744
a34c99c
* Mon May 14 2018 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.0-1
a34c99c
- Initial package.