Repository navigation
Expand file tree
/
Copy pathpython3-hpack.spec
More file actions
91 lines (76 loc) · 2.31 KB
/
Copy pathpython3-hpack.spec
File metadata and controls
91 lines (76 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests (fixtures missing in sdist)
Summary: HTTP/2 Header Encoding for Python 3
Summary(pl.UTF-8): Kodowanie nagłówków HTTP/2 dla Pythona 3
Name: python3-hpack
# keep in sync with python3-h2.spec (<5 in h2 4.1)
Version: 4.2.0
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/hpack/
Source0: https://files.pythonhosted.org/packages/source/h/hpack/hpack-%{version}.tar.gz
# Source0-md5: b9e407d481be0790533689779b6b86ca
URL: https://pypi.org/project/hpack/
BuildRequires: python3-build
BuildRequires: python3-installer
BuildRequires: python3-modules >= 1:3.10
BuildRequires: python3-setuptools >= 1:82
BuildRequires: python3-wheel >= 0.46.3
%if %{with tests}
BuildRequires: python3-hypothesis >= 6.119.4
BuildRequires: python3-pytest >= 9.0.3
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 2.044
%if %{with doc}
BuildRequires: sphinx-pdg-3 >= 7.4.7
%endif
Requires: python3-modules >= 1:3.10
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This module contains a pure-Python HTTP/2 header encoding (HPACK)
logic for use in Python programs that implement HTTP/2.
%description -l pl.UTF-8
Ten moduł zawiera czysto pythonową logikę kodowania nagłówków HTTP/2
(HPACK) dla programów, które implementują HTTP/2.
%package apidocs
Summary: API documentation for Python hpack module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona hpack
Group: Documentation
%description apidocs
API documentation for Python hpack module.
%description apidocs -l pl.UTF-8
Dokumentacja API modułu Pythona hpack.
%prep
%setup -q -n hpack-%{version}
%build
%py3_build_pyproject
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
PYTHONPATH=$(pwd)/src \
%{__python3} -m pytest tests
%endif
%if %{with doc}
PYTHONPATH=$(pwd)/src \
%{__make} -C docs html \
SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGELOG.rst CONTRIBUTORS.rst LICENSE README.rst
%{py3_sitescriptdir}/hpack
%{py3_sitescriptdir}/hpack-%{version}.dist-info
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
%doc docs/build/html/{_modules,_static,security,*.html,*.js}
%endif