]> git.pld-linux.org Git - packages/python-hyperframe.git/blob - python-hyperframe.spec
aa9aa5b326458bbbd0a60e8616e94f5827957011
[packages/python-hyperframe.git] / python-hyperframe.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 framing layer for Python 2
8 Summary(pl.UTF-8):      Warstwa ramek HTTP/2 dla Pythona 2
9 Name:           python-hyperframe
10 Version:        5.2.0
11 Release:        2
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/hyperframe/
15 Source0:        https://files.pythonhosted.org/packages/source/h/hyperframe/hyperframe-%{version}.tar.gz
16 # Source0-md5:  6919183242feb26d8bce3b4cba81defd
17 URL:            https://pypi.org/project/hyperframe/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-pytest
23 %endif
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.4
27 BuildRequires:  python3-setuptools
28 %if %{with tests}
29 BuildRequires:  python3-pytest
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This library contains the HTTP/2 framing code used in the hyper
40 project. It provides a pure-Python codebase that is capable of
41 decoding a binary stream into HTTP/2 frames.
42
43 %description -l pl.UTF-8
44 Ta biblioteka zawiera kod obsługujący ramki HTTP/2, używany w
45 projekcie hyper. Zawiera czysto pythonową implementację, potrafiącą
46 dekodować strumień binary na ramki HTTP/2.
47
48 %package -n python3-hyperframe
49 Summary:        HTTP/2 framing layer for Python 3
50 Summary(pl.UTF-8):      Warstwa ramek HTTP/2 dla Pythona 3
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.4
53
54 %description -n python3-hyperframe
55 This library contains the HTTP/2 framing code used in the hyper
56 project. It provides a pure-Python codebase that is capable of
57 decoding a binary stream into HTTP/2 frames.
58
59 %description -n python3-hyperframe -l pl.UTF-8
60 Ta biblioteka zawiera kod obsługujący ramki HTTP/2, używany w
61 projekcie hyper. Zawiera czysto pythonową implementację, potrafiącą
62 dekodować strumień binary na ramki HTTP/2.
63
64 %prep
65 %setup -q -n hyperframe-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 %{__python} -m pytest test
73 %endif
74 %endif
75
76 %if %{with python3}
77 %py3_build
78
79 %if %{with tests}
80 %{__python3} -m pytest test
81 %endif
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
104 %{py_sitescriptdir}/hyperframe
105 %{py_sitescriptdir}/hyperframe-%{version}-py*.egg-info
106 %endif
107
108 %if %{with python3}
109 %files -n python3-hyperframe
110 %defattr(644,root,root,755)
111 %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst
112 %{py3_sitescriptdir}/hyperframe
113 %{py3_sitescriptdir}/hyperframe-%{version}-py*.egg-info
114 %endif
This page took 0.045568 seconds and 2 git commands to generate.