]> git.pld-linux.org Git - packages/python-geventhttpclient.git/blob - python-geventhttpclient.spec
rebuild with python 3.10
[packages/python-geventhttpclient.git] / python-geventhttpclient.spec
1 #
2 # Conditional build:
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
6
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}
11 Version:        1.5.3
12 Release:        3
13 License:        MIT
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
21 %if %{with python2}
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
26 %if %{with tests}
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
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-devel >= 1:3.4
37 BuildRequires:  python3-modules >= 1:3.4
38 BuildRequires:  python3-setuptools
39 %if %{with tests}
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
46 %endif
47 %endif
48 Requires:       python-modules >= 1:2.7.9
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 A high performance, concurrent HTTP client library for Python 2 using
53 gevent.
54
55 geventhttpclient use a fast HTTP parser, written in C, originating
56 from nginx, extracted and modified by Joyent.
57
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
61 API's like Twitter's.
62
63 Safe SSL support is provided by default.
64
65 %description -l pl.UTF-8
66 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
67 2, wykorzystująca gevent.
68
69 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
70 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
71
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.
76
77 Domyślnie dostępna jest obsługa bezpiecznego SSL.
78
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
84
85 %description -n python3-%{module}
86 A high performance, concurrent HTTP client library for Python 3 using
87 gevent.
88
89 geventhttpclient use a fast HTTP parser, written in C, originating
90 from nginx, extracted and modified by Joyent.
91
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
95 API's like Twitter's.
96
97 Safe SSL support is provided by default.
98
99 %description -n python3-%{module} -l pl.UTF-8
100 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
101 3, wykorzystująca gevent.
102
103 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
104 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
105
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.
110
111 Domyślnie dostępna jest obsługa bezpiecznego SSL.
112
113 %prep
114 %setup -q -n %{module}-%{version}
115
116 %{__rm} -r src/geventhttpclient.egg-info
117
118 %build
119 %if %{with python2}
120 %py_build
121
122 %if %{with tests}
123 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
124 PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
125 %{__python} -m pytest src
126 %endif
127 %endif
128
129 %if %{with python3}
130 %py3_build
131
132 %if %{with tests}
133 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
134 PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
135 %{__python3} -m pytest src
136 %endif
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with python2}
143 %py_install
144
145 %py_postclean
146 %endif
147
148 %if %{with python3}
149 %py3_install
150 %endif
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %if %{with python2}
156 %files
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
163 %endif
164
165 %if %{with python3}
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
174 %endif
This page took 0.157711 seconds and 3 git commands to generate.