]> git.pld-linux.org Git - packages/python-geventhttpclient.git/blob - python-geventhttpclient.spec
- updated to 1.3.1
[packages/python-geventhttpclient.git] / python-geventhttpclient.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # py.test tests
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.3.1
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.python.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.python.org/pypi/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-certifi
28 BuildRequires:  python-gevent >= 0.13
29 BuildRequires:  python-pytest
30 BuildRequires:  python-six
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-devel >= 1:3.4
35 BuildRequires:  python3-modules >= 1:3.4
36 BuildRequires:  python3-setuptools
37 %if %{with tests}
38 BuildRequires:  python3-certifi
39 BuildRequires:  python3-gevent >= 0.13
40 BuildRequires:  python3-pytest
41 BuildRequires:  python3-six
42 %endif
43 %endif
44 Requires:       python-modules >= 1:2.7.9
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 A high performance, concurrent HTTP client library for Python 2 using
49 gevent.
50
51 geventhttpclient use a fast HTTP parser, written in C, originating
52 from nginx, extracted and modified by Joyent.
53
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
57 API's like Twitter's.
58
59 Safe SSL support is provided by default.
60
61 %description -l pl.UTF-8
62 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
63 2, wykorzystująca gevent.
64
65 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
66 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
67
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.
72
73 Domyślnie dostępna jest obsługa bezpiecznego SSL.
74
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
80
81 %description -n python3-%{module}
82 A high performance, concurrent HTTP client library for Python 3 using
83 gevent.
84
85 geventhttpclient use a fast HTTP parser, written in C, originating
86 from nginx, extracted and modified by Joyent.
87
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
91 API's like Twitter's.
92
93 Safe SSL support is provided by default.
94
95 %description -n python3-%{module} -l pl.UTF-8
96 Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP dla Pythona
97 3, wykorzystująca gevent.
98
99 geventhttpclient wykorzystuje szybki parser HTTP, napisany w C,
100 pochodzący z serwera nginx, wyciągniety i zmodyfikowany przez Joyenta.
101
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.
106
107 Domyślnie dostępna jest obsługa bezpiecznego SSL.
108
109 %prep
110 %setup -q -n %{module}-%{version}
111
112 %{__rm} -r src/geventhttpclient/tests/__pycache__ \
113         src/geventhttpclient.egg-info
114
115 %build
116 %if %{with python2}
117 %py_build
118
119 %{?with_tests:PYTHONPATH=$(pwd)/$(echo build-2/lib.*) %{__python} -m pytest src}
120 %endif
121
122 %if %{with python3}
123 %py3_build
124
125 %{?with_tests:PYTHONPATH=$(pwd)/$(echo build-3/lib.*) %{__python3} -m pytest src}
126 %endif
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with python2}
132 %py_install
133
134 %py_postclean
135 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/geventhttpclient/tests
136 %endif
137
138 %if %{with python3}
139 %py3_install
140
141 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/geventhttpclient/tests
142 %endif
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %if %{with python2}
148 %files
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
154 %endif
155
156 %if %{with python3}
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
164 %endif
This page took 0.083239 seconds and 4 git commands to generate.