]>
Commit | Line | Data |
---|---|---|
51d1a799 JB |
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: A HTTP/2 Priority Implementation | |
8 | Summary(pl.UTF-8): Implementacja priorytetów HTTP/2 | |
9 | Name: python-priority | |
10 | Version: 1.3.0 | |
eaf0f7f1 | 11 | Release: 3 |
51d1a799 JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/priority/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/p/priority/priority-%{version}.tar.gz | |
16 | # Source0-md5: 4f1ff52f7fa448e9d9cb46337ae86d1e | |
17 | URL: https://pypi.org/project/priority/ | |
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 | Priority is a pure-Python implementation of the priority logic for | |
42 | HTTP/2, set out in RFC 7540 Section 5.3 (Stream Priority). This logic | |
43 | allows for clients to express a preference for how the server | |
44 | allocates its (limited) resources to the many outstanding HTTP | |
45 | requests that may be running over a single HTTP/2 connection. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Priority to czysto pythonowa implementacja logiki priorytetów dla | |
49 | HTTP/2, zgodnej z sekcją 5.3 (Stream Priority) RFC 7540. Logika ta | |
50 | pozwala klientom wyrażać preferencje, jak serwer ma przydzielać swoje | |
51 | (ograniczone) zasoby na wiele oczekujących żądań HTTP, które mogą być | |
52 | uruchomione na pojedynczym połączeniu HTTP/2. | |
53 | ||
54 | %package -n python3-priority | |
55 | Summary: A HTTP/2 Priority Implementation | |
56 | Summary(pl.UTF-8): Implementacja priorytetów HTTP/2 | |
57 | Group: Libraries/Python | |
58 | Requires: python3-modules >= 1:3.3 | |
59 | ||
60 | %description -n python3-priority | |
61 | Priority is a pure-Python implementation of the priority logic for | |
62 | HTTP/2, set out in RFC 7540 Section 5.3 (Stream Priority). This logic | |
63 | allows for clients to express a preference for how the server | |
64 | allocates its (limited) resources to the many outstanding HTTP | |
65 | requests that may be running over a single HTTP/2 connection. | |
66 | ||
67 | %description -n python3-priority -l pl.UTF-8 | |
68 | Priority to czysto pythonowa implementacja logiki priorytetów dla | |
69 | HTTP/2, zgodnej z sekcją 5.3 (Stream Priority) RFC 7540. Logika ta | |
70 | pozwala klientom wyrażać preferencje, jak serwer ma przydzielać swoje | |
71 | (ograniczone) zasoby na wiele oczekujących żądań HTTP, które mogą być | |
72 | uruchomione na pojedynczym połączeniu HTTP/2. | |
73 | ||
74 | %prep | |
75 | %setup -q -n priority-%{version} | |
76 | ||
77 | %build | |
78 | %if %{with python2} | |
79 | %py_build | |
80 | ||
81 | %if %{with tests} | |
82 | # test_period_of_repetition seems unreliable (too sensitive to system load) | |
83 | PYTHONPATH=$(pwd)/src \ | |
84 | %{__python} -m pytest test -k 'not test_period_of_repetition' | |
85 | %endif | |
86 | %endif | |
87 | ||
88 | %if %{with python3} | |
89 | %py3_build | |
90 | ||
91 | %if %{with tests} | |
92 | PYTHONPATH=$(pwd)/src \ | |
93 | %{__python3} -m pytest test -k 'not test_period_of_repetition' | |
94 | %endif | |
95 | %endif | |
96 | ||
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %py_install | |
102 | ||
103 | %py_postclean | |
104 | %endif | |
105 | ||
106 | %if %{with python3} | |
107 | %py3_install | |
108 | %endif | |
109 | ||
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %if %{with python2} | |
114 | %files | |
115 | %defattr(644,root,root,755) | |
116 | %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst | |
117 | %{py_sitescriptdir}/priority | |
118 | %{py_sitescriptdir}/priority-%{version}-py*.egg-info | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %files -n python3-priority | |
123 | %defattr(644,root,root,755) | |
124 | %doc CONTRIBUTORS.rst HISTORY.rst LICENSE README.rst | |
125 | %{py3_sitescriptdir}/priority | |
126 | %{py3_sitescriptdir}/priority-%{version}-py*.egg-info | |
127 | %endif |