]> git.pld-linux.org Git - packages/python-priority.git/blame - python-priority.spec
rebuild with python 3.10
[packages/python-priority.git] / python-priority.spec
CommitLineData
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
7Summary: A HTTP/2 Priority Implementation
8Summary(pl.UTF-8): Implementacja priorytetów HTTP/2
9Name: python-priority
10Version: 1.3.0
eaf0f7f1 11Release: 3
51d1a799
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/priority/
15Source0: https://files.pythonhosted.org/packages/source/p/priority/priority-%{version}.tar.gz
16# Source0-md5: 4f1ff52f7fa448e9d9cb46337ae86d1e
17URL: https://pypi.org/project/priority/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-hypothesis
23BuildRequires: python-pytest
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.3
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-hypothesis
31BuildRequires: python3-pytest
32%endif
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36Requires: python-modules >= 1:2.7
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41Priority is a pure-Python implementation of the priority logic for
42HTTP/2, set out in RFC 7540 Section 5.3 (Stream Priority). This logic
43allows for clients to express a preference for how the server
44allocates its (limited) resources to the many outstanding HTTP
45requests that may be running over a single HTTP/2 connection.
46
47%description -l pl.UTF-8
48Priority to czysto pythonowa implementacja logiki priorytetów dla
49HTTP/2, zgodnej z sekcją 5.3 (Stream Priority) RFC 7540. Logika ta
50pozwala klientom wyrażać preferencje, jak serwer ma przydzielać swoje
51(ograniczone) zasoby na wiele oczekujących żądań HTTP, które mogą być
52uruchomione na pojedynczym połączeniu HTTP/2.
53
54%package -n python3-priority
55Summary: A HTTP/2 Priority Implementation
56Summary(pl.UTF-8): Implementacja priorytetów HTTP/2
57Group: Libraries/Python
58Requires: python3-modules >= 1:3.3
59
60%description -n python3-priority
61Priority is a pure-Python implementation of the priority logic for
62HTTP/2, set out in RFC 7540 Section 5.3 (Stream Priority). This logic
63allows for clients to express a preference for how the server
64allocates its (limited) resources to the many outstanding HTTP
65requests that may be running over a single HTTP/2 connection.
66
67%description -n python3-priority -l pl.UTF-8
68Priority to czysto pythonowa implementacja logiki priorytetów dla
69HTTP/2, zgodnej z sekcją 5.3 (Stream Priority) RFC 7540. Logika ta
70pozwala klientom wyrażać preferencje, jak serwer ma przydzielać swoje
71(ograniczone) zasoby na wiele oczekujących żądań HTTP, które mogą być
72uruchomione 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)
83PYTHONPATH=$(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}
92PYTHONPATH=$(pwd)/src \
93%{__python3} -m pytest test -k 'not test_period_of_repetition'
94%endif
95%endif
96
97%install
98rm -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
111rm -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
This page took 0.060574 seconds and 4 git commands to generate.