3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: A HTTP/2 Priority Implementation
8 Summary(pl.UTF-8): Implementacja priorytetów HTTP/2
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/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
22 BuildRequires: python-hypothesis
23 BuildRequires: python-pytest
27 BuildRequires: python3-modules >= 1:3.3
28 BuildRequires: python3-setuptools
30 BuildRequires: python3-hypothesis
31 BuildRequires: python3-pytest
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
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
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.
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.
75 %setup -q -n priority-%{version}
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'
92 PYTHONPATH=$(pwd)/src \
93 %{__python3} -m pytest test -k 'not test_period_of_repetition'
98 rm -rf $RPM_BUILD_ROOT
111 rm -rf $RPM_BUILD_ROOT
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
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