3 %bcond_with tests # py.test tests [use network]
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module geventhttpclient
8 Summary: A high performance, concurrent HTTP client library
9 Summary(pl.UTF-8): Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/geventhttpclient/
16 Source0: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
17 # Source0-md5: 791ce820ce5c73bac45c2d79c3d0aaf8
18 URL: https://pypi.org/project/geventhttpclient/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 # older versions generate pythonegg(backports.ssl_match_hostname) dependency
23 BuildRequires: python-devel >= 1:2.7.9
24 BuildRequires: python-modules >= 1:2.7.9
25 BuildRequires: python-setuptools
27 BuildRequires: python-brotli
28 BuildRequires: python-certifi
29 BuildRequires: python-dpkt
30 BuildRequires: python-gevent >= 0.13
31 BuildRequires: python-pytest
32 BuildRequires: python-six
36 BuildRequires: python3-devel >= 1:3.4
37 BuildRequires: python3-modules >= 1:3.4
38 BuildRequires: python3-setuptools
40 BuildRequires: python3-brotli
41 BuildRequires: python3-certifi
42 BuildRequires: python3-dpkt
43 BuildRequires: python3-gevent >= 0.13
44 BuildRequires: python3-pytest
45 BuildRequires: python3-six
48 Requires: python-modules >= 1:2.7.9
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 A high performance, concurrent HTTP client library for Python 2 using
55 geventhttpclient use a fast HTTP parser, written in C, originating
56 from nginx, extracted and modified by Joyent.
58 geventhttpclient has been specifically designed for high concurrency,
59 streaming and support HTTP 1.1 persistent connections. More generally
60 it is designed for efficiently pulling from REST APIs and streaming
63 Safe SSL support is provided by default.
65 %description -l pl.UTF-8
66 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
67 2, wykorzystująca gevent.
69 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
70 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
72 geventhttpclient został zaprojektowany w szczególności z myślą o
73 dużym zrównolegleniu, przesyłaniu strumieni i obsłudze trwałych
74 połączeń HTTP 1.1. Bardziej ogólnie, jest przeznaczony do wydajnego
75 pobierania z API REST-owych oraz strumieniowych, takich jak Twitter.
77 Domyślnie dostępna jest obsługa bezpiecznego SSL.
79 %package -n python3-%{module}
80 Summary: A high performance, concurrent HTTP client library
81 Summary(pl.UTF-8): Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP
82 Group: Libraries/Python
83 Requires: python3-modules >= 1:3.4
85 %description -n python3-%{module}
86 A high performance, concurrent HTTP client library for Python 3 using
89 geventhttpclient use a fast HTTP parser, written in C, originating
90 from nginx, extracted and modified by Joyent.
92 geventhttpclient has been specifically designed for high concurrency,
93 streaming and support HTTP 1.1 persistent connections. More generally
94 it is designed for efficiently pulling from REST APIs and streaming
97 Safe SSL support is provided by default.
99 %description -n python3-%{module} -l pl.UTF-8
100 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
101 3, wykorzystująca gevent.
103 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
104 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
106 geventhttpclient został zaprojektowany w szczególności z myślą o
107 dużym zrównolegleniu, przesyłaniu strumieni i obsłudze trwałych
108 połączeń HTTP 1.1. Bardziej ogólnie, jest przeznaczony do wydajnego
109 pobierania z API REST-owych oraz strumieniowych, takich jak Twitter.
111 Domyślnie dostępna jest obsługa bezpiecznego SSL.
114 %setup -q -n %{module}-%{version}
116 %{__rm} -r src/geventhttpclient.egg-info
123 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
124 PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
125 %{__python} -m pytest src
133 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
134 PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
135 %{__python3} -m pytest src
140 rm -rf $RPM_BUILD_ROOT
153 rm -rf $RPM_BUILD_ROOT
157 %defattr(644,root,root,755)
158 %doc LICENSE-MIT README.mdown
159 %dir %{py_sitedir}/geventhttpclient
160 %{py_sitedir}/geventhttpclient/*.py[co]
161 %attr(755,root,root) %{py_sitedir}/geventhttpclient/_parser.so
162 %{py_sitedir}/geventhttpclient-%{version}-py*.egg-info
166 %files -n python3-%{module}
167 %defattr(644,root,root,755)
168 %doc LICENSE-MIT README.mdown
169 %dir %{py3_sitedir}/geventhttpclient
170 %{py3_sitedir}/geventhttpclient/*.py
171 %{py3_sitedir}/geventhttpclient/__pycache__
172 %attr(755,root,root) %{py3_sitedir}/geventhttpclient/_parser.cpython-*.so
173 %{py3_sitedir}/geventhttpclient-%{version}-py*.egg-info