3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: hyper-h2 - HTTP/2 protocol stack
9 Summary(pl.UTF-8): hyper-h2 - stos protokołu HTTP/2
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/h2/
16 Source0: https://files.pythonhosted.org/packages/source/h/h2/h2-%{version}.tar.gz
17 # Source0-md5: 197a99c09f344a0dd987fab9801dc8d0
18 URL: https://pypi.org/project/h2/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-enum34 >= 1.1.6
24 BuildRequires: python-enum34 < 2
25 BuildRequires: python-hpack >= 3.0
26 BuildRequires: python-hpack < 4
27 BuildRequires: python-hyperframe >= 5.2.0
28 BuildRequires: python-hyperframe < 6
29 BuildRequires: python-hypothesis
30 BuildRequires: python-pytest
35 BuildRequires: python3-modules >= 1:3.4
36 BuildRequires: python3-setuptools
38 BuildRequires: python3-hpack >= 3.0
39 BuildRequires: python3-hpack < 4
40 BuildRequires: python3-hyperframe >= 5.2.0
41 BuildRequires: python3-hyperframe < 6
42 BuildRequires: python3-hypothesis
43 BuildRequires: python3-pytest
47 BuildRequires: rpm-pythonprov
48 BuildRequires: rpmbuild(macros) >= 1.714
50 BuildRequires: sphinx-pdg
52 Requires: python-modules >= 1:2.7
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 This package is a pure-Python implementation of a HTTP/2 protocol
58 stack. It's written from the ground up to be embeddable in whatever
59 program you choose to use, ensuring that you can speak HTTP/2
60 regardless of your programming paradigm.
62 %description -l pl.UTF-8
63 Ten pakiet to czysto pythonowa implementacja stosu protokołu HTTP/2.
64 Jest napisana od podstaw tak, aby była osadzalna w dowolnym programie,
65 zapewniając obsługę HTTP/2 niezależnie od paradygmatu programowania.
67 %package -n python3-h2
68 Summary: hyper-h2 - HTTP/2 protocol stack
69 Summary(pl.UTF-8): hyper-h2 - stos protokołu HTTP/2
70 Group: Libraries/Python
71 Requires: python3-modules >= 1:3.4
73 %description -n python3-h2
74 This package is a pure-Python implementation of a HTTP/2 protocol
75 stack. It's written from the ground up to be embeddable in whatever
76 program you choose to use, ensuring that you can speak HTTP/2
77 regardless of your programming paradigm.
79 %description -n python3-h2 -l pl.UTF-8
80 Ten pakiet to czysto pythonowa implementacja stosu protokołu HTTP/2.
81 Jest napisana od podstaw tak, aby była osadzalna w dowolnym programie,
82 zapewniając obsługę HTTP/2 niezależnie od paradygmatu programowania.
85 Summary: API documentation for Python h2 module
86 Summary(pl.UTF-8): Dokumentacja API modułu Pythona h2
90 API documentation for Python h2 module.
92 %description apidocs -l pl.UTF-8
93 Dokumentacja API modułu Pythona h2.
96 %setup -q -n h2-%{version}
103 %{__python} -m pytest test
111 %{__python3} -m pytest test
116 %{__make} -C docs html
120 rm -rf $RPM_BUILD_ROOT
133 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
139 %{py_sitescriptdir}/h2
140 %{py_sitescriptdir}/h2-%{version}-py*.egg-info
145 %defattr(644,root,root,755)
146 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
147 %{py3_sitescriptdir}/h2
148 %{py3_sitescriptdir}/h2-%{version}-py*.egg-info
153 %defattr(644,root,root,755)
154 %doc docs/build/html/{_images,_modules,_static,*.html,*.js}