]> git.pld-linux.org Git - packages/python-h2.git/blame - python-h2.spec
rebuild with tests and docs
[packages/python-h2.git] / python-h2.spec
CommitLineData
3e7da56f
JB
1#
2# Conditional build:
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
7
8Summary: hyper-h2 - HTTP/2 protocol stack
9Summary(pl.UTF-8): hyper-h2 - stos protokołu HTTP/2
10Name: python-h2
11Version: 3.2.0
bfaf0f4d 12Release: 5
3e7da56f
JB
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/h2/
16Source0: https://files.pythonhosted.org/packages/source/h/h2/h2-%{version}.tar.gz
17# Source0-md5: 197a99c09f344a0dd987fab9801dc8d0
18URL: https://pypi.org/project/h2/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-enum34 >= 1.1.6
24BuildRequires: python-enum34 < 2
25BuildRequires: python-hpack >= 3.0
26BuildRequires: python-hpack < 4
27BuildRequires: python-hyperframe >= 5.2.0
28BuildRequires: python-hyperframe < 6
29BuildRequires: python-hypothesis
30BuildRequires: python-pytest
31# >= 4.6.5
32%endif
33%endif
34%if %{with python3}
35BuildRequires: python3-modules >= 1:3.4
36BuildRequires: python3-setuptools
37%if %{with tests}
38BuildRequires: python3-hpack >= 3.0
39BuildRequires: python3-hpack < 4
40BuildRequires: python3-hyperframe >= 5.2.0
41BuildRequires: python3-hyperframe < 6
42BuildRequires: python3-hypothesis
43BuildRequires: python3-pytest
44# >= 4.6.5
45%endif
46%endif
47BuildRequires: rpm-pythonprov
48BuildRequires: rpmbuild(macros) >= 1.714
49%if %{with doc}
50BuildRequires: sphinx-pdg
51%endif
52Requires: python-modules >= 1:2.7
53BuildArch: noarch
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%description
57This package is a pure-Python implementation of a HTTP/2 protocol
58stack. It's written from the ground up to be embeddable in whatever
59program you choose to use, ensuring that you can speak HTTP/2
60regardless of your programming paradigm.
61
62%description -l pl.UTF-8
63Ten pakiet to czysto pythonowa implementacja stosu protokołu HTTP/2.
64Jest napisana od podstaw tak, aby była osadzalna w dowolnym programie,
65zapewniając obsługę HTTP/2 niezależnie od paradygmatu programowania.
66
67%package -n python3-h2
68Summary: hyper-h2 - HTTP/2 protocol stack
69Summary(pl.UTF-8): hyper-h2 - stos protokołu HTTP/2
70Group: Libraries/Python
71Requires: python3-modules >= 1:3.4
72
73%description -n python3-h2
74This package is a pure-Python implementation of a HTTP/2 protocol
75stack. It's written from the ground up to be embeddable in whatever
76program you choose to use, ensuring that you can speak HTTP/2
77regardless of your programming paradigm.
78
79%description -n python3-h2 -l pl.UTF-8
80Ten pakiet to czysto pythonowa implementacja stosu protokołu HTTP/2.
81Jest napisana od podstaw tak, aby była osadzalna w dowolnym programie,
82zapewniając obsługę HTTP/2 niezależnie od paradygmatu programowania.
83
84%package apidocs
85Summary: API documentation for Python h2 module
86Summary(pl.UTF-8): Dokumentacja API modułu Pythona h2
87Group: Documentation
88
89%description apidocs
90API documentation for Python h2 module.
91
92%description apidocs -l pl.UTF-8
93Dokumentacja API modułu Pythona h2.
94
95%prep
96%setup -q -n h2-%{version}
97
98%build
99%if %{with python2}
100%py_build
101
102%if %{with tests}
103%{__python} -m pytest test
104%endif
105%endif
106
107%if %{with python3}
108%py3_build
109
110%if %{with tests}
111%{__python3} -m pytest test
112%endif
113%endif
114
115%if %{with doc}
116%{__make} -C docs html
117%endif
118
119%install
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%py_install
124
125%py_postclean
126%endif
127
128%if %{with python3}
129%py3_install
130%endif
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%if %{with python2}
136%files
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
141%endif
142
143%if %{with python3}
144%files -n python3-h2
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
149%endif
150
151%if %{with doc}
152%files apidocs
153%defattr(644,root,root,755)
154%doc docs/build/html/{_images,_modules,_static,*.html,*.js}
155%endif
This page took 0.157937 seconds and 4 git commands to generate.