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: 9aaac96fa4856ac919869a261c8b3dcb
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-certifi
28 BuildRequires: python-gevent >= 0.13
29 BuildRequires: python-pytest
30 BuildRequires: python-six
34 BuildRequires: python3-devel >= 1:3.4
35 BuildRequires: python3-modules >= 1:3.4
36 BuildRequires: python3-setuptools
38 BuildRequires: python3-certifi
39 BuildRequires: python3-gevent >= 0.13
40 BuildRequires: python3-pytest
41 BuildRequires: python3-six
44 Requires: python-modules >= 1:2.7.9
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 A high performance, concurrent HTTP client library for Python 2 using
51 geventhttpclient use a fast HTTP parser, written in C, originating
52 from nginx, extracted and modified by Joyent.
54 geventhttpclient has been specifically designed for high concurrency,
55 streaming and support HTTP 1.1 persistent connections. More generally
56 it is designed for efficiently pulling from REST APIs and streaming
59 Safe SSL support is provided by default.
61 %description -l pl.UTF-8
62 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
63 2, wykorzystująca gevent.
65 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
66 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
68 geventhttpclient został zaprojektowany w szczególności z myślą o
69 dużym zrównolegleniu, przesyłaniu strumieni i obsłudze trwałych
70 połączeń HTTP 1.1. Bardziej ogólnie, jest przeznaczony do wydajnego
71 pobierania z API REST-owych oraz strumieniowych, takich jak Twitter.
73 Domyślnie dostępna jest obsługa bezpiecznego SSL.
75 %package -n python3-%{module}
76 Summary: A high performance, concurrent HTTP client library
77 Summary(pl.UTF-8): Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP
78 Group: Libraries/Python
79 Requires: python3-modules >= 1:3.4
81 %description -n python3-%{module}
82 A high performance, concurrent HTTP client library for Python 3 using
85 geventhttpclient use a fast HTTP parser, written in C, originating
86 from nginx, extracted and modified by Joyent.
88 geventhttpclient has been specifically designed for high concurrency,
89 streaming and support HTTP 1.1 persistent connections. More generally
90 it is designed for efficiently pulling from REST APIs and streaming
93 Safe SSL support is provided by default.
95 %description -n python3-%{module} -l pl.UTF-8
96 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
97 3, wykorzystująca gevent.
99 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
100 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
102 geventhttpclient został zaprojektowany w szczególności z myślą o
103 dużym zrównolegleniu, przesyłaniu strumieni i obsłudze trwałych
104 połączeń HTTP 1.1. Bardziej ogólnie, jest przeznaczony do wydajnego
105 pobierania z API REST-owych oraz strumieniowych, takich jak Twitter.
107 Domyślnie dostępna jest obsługa bezpiecznego SSL.
110 %setup -q -n %{module}-%{version}
112 %{__rm} -r src/geventhttpclient/tests/__pycache__ \
113 src/geventhttpclient.egg-info
119 %{?with_tests:PYTHONPATH=$(pwd)/$(echo build-2/lib.*) %{__python} -m pytest src}
125 %{?with_tests:PYTHONPATH=$(pwd)/$(echo build-3/lib.*) %{__python3} -m pytest src}
129 rm -rf $RPM_BUILD_ROOT
135 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/geventhttpclient/tests
141 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/geventhttpclient/tests
145 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %dir %{py_sitedir}/geventhttpclient
151 %{py_sitedir}/geventhttpclient/*.py[co]
152 %attr(755,root,root) %{py_sitedir}/geventhttpclient/_parser.so
153 %{py_sitedir}/geventhttpclient-%{version}-py*.egg-info
157 %files -n python3-%{module}
158 %defattr(644,root,root,755)
159 %dir %{py3_sitedir}/geventhttpclient
160 %{py3_sitedir}/geventhttpclient/*.py
161 %{py3_sitedir}/geventhttpclient/__pycache__
162 %attr(755,root,root) %{py3_sitedir}/geventhttpclient/_parser.cpython-*.so
163 %{py3_sitedir}/geventhttpclient-%{version}-py*.egg-info