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