]> git.pld-linux.org Git - packages/python-hpack.git/blob - python-hpack.spec
9453ac934812b8f0f2dfb3355e13fa7bd98316c8
[packages/python-hpack.git] / python-hpack.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        HTTP/2 Header Encoding for Python 2
8 Summary(pl.UTF-8):      Kodowanie nagłówków HTTP/2 dla Pythona 2
9 Name:           python-hpack
10 Version:        3.0.0
11 Release:        3
12 License:        MIT
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-hypothesis
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.3
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-hypothesis
31 BuildRequires:  python3-pytest
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.7
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 This module contains a pure-Python HTTP/2 header encoding (HPACK)
42 logic for use in Python programs that implement HTTP/2.
43
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.
47
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
53
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.
57
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.
61
62 %prep
63 %setup -q -n hpack-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build
68
69 %if %{with tests}
70 # test_hpack_integration.py requires test_fixtures not included in release tarball
71 %{__python} -m pytest test -k 'not TestHPACKDecoderIntegration'
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 %{__python3} -m pytest test -k 'not TestHPACKDecoderIntegration'
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
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
105 %endif
106
107 %if %{with python3}
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
113 %endif
This page took 0.063497 seconds and 2 git commands to generate.