3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: HTTP/2 Header Encoding for Python 2
8 Summary(pl.UTF-8): Kodowanie nagłówków HTTP/2 dla Pythona 2
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/hpack/
15 Source0: https://files.pythonhosted.org/packages/source/h/hpack/hpack-%{version}.tar.gz
16 # Source0-md5: 556b0ae66180f54c2ce8029a0952088b
17 URL: https://pypi.org/project/hpack/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
22 BuildRequires: python-hypothesis
23 BuildRequires: python-pytest
27 BuildRequires: python3-modules >= 1:3.3
28 BuildRequires: python3-setuptools
30 BuildRequires: python3-hypothesis
31 BuildRequires: python3-pytest
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 This module contains a pure-Python HTTP/2 header encoding (HPACK)
42 logic for use in Python programs that implement HTTP/2.
44 %description -l pl.UTF-8
45 Ten moduł zawiera czysto pythonową logikę kodowania nagłówków HTTP/2
46 (HPACK) dla programów, które implementują HTTP/2.
48 %package -n python3-hpack
49 Summary: HTTP/2 Header Encoding for Python 3
50 Summary(pl.UTF-8): Kodowanie nagłówków HTTP/2 dla Pythona 3
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.3
54 %description -n python3-hpack
55 This module contains a pure-Python HTTP/2 header encoding (HPACK)
56 logic for use in Python programs that implement HTTP/2.
58 %description -n python3-hpack -l pl.UTF-8
59 Ten moduł zawiera czysto pythonową logikę kodowania nagłówków HTTP/2
60 (HPACK) dla programów, które implementują HTTP/2.
63 %setup -q -n hpack-%{version}
70 # test_hpack_integration.py requires test_fixtures not included in release tarball
71 %{__python} -m pytest test -k 'not TestHPACKDecoderIntegration'
79 %{__python3} -m pytest test -k 'not TestHPACKDecoderIntegration'
84 rm -rf $RPM_BUILD_ROOT
97 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
102 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
103 %{py_sitescriptdir}/hpack
104 %{py_sitescriptdir}/hpack-%{version}-py*.egg-info
108 %files -n python3-hpack
109 %defattr(644,root,root,755)
110 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
111 %{py3_sitescriptdir}/hpack
112 %{py3_sitescriptdir}/hpack-%{version}-py*.egg-info