3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module
8 %define module geventhttpclient
9 Summary: A high performance, concurrent HTTP client library
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://pypi.python.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
16 # Source0-md5: 1b3070e09b6e50fce929771f3f4fc9a6
17 URL: https://pypi.python.org/pypi/geventhttpclient
18 BuildRequires: python-gevent
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.612
22 BuildRequires: python-devel
23 BuildRequires: python-setuptools
25 BuildRequires: python-certifi
29 BuildRequires: python3-devel
30 BuildRequires: python3-modules
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-certifi
36 Requires: python-modules
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 A high performance, concurrent HTTP client library for Python using
43 geventhttpclient use a fast HTTP parser, written in C, originating
44 from nginx, extracted and modified by Joyent.
46 geventhttpclient has been specifically designed for high concurrency,
47 streaming and support HTTP 1.1 persistent connections. More generally
48 it is designed for efficiently pulling from REST APIs and streaming
51 Safe SSL support is provided by default.
53 %package -n python3-%{module}
54 Summary: A high performance, concurrent HTTP client library
55 Group: Libraries/Python
56 Requires: python3-modules
58 %description -n python3-%{module}
59 A high performance, concurrent HTTP client library for Python using
62 geventhttpclient use a fast HTTP parser, written in C, originating
63 from nginx, extracted and modified by Joyent.
65 geventhttpclient has been specifically designed for high concurrency,
66 streaming and support HTTP 1.1 persistent connections. More generally
67 it is designed for efficiently pulling from REST APIs and streaming
70 Safe SSL support is provided by default.
73 %setup -q -n %{module}-%{version}
78 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
79 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
84 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
85 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
89 rm -rf $RPM_BUILD_ROOT
92 %{__python} setup.py \
93 build --build-base build-2 \
94 install --skip-build \
96 --root=$RPM_BUILD_ROOT
102 %{__python3} setup.py \
103 build --build-base build-3 \
104 install --skip-build \
106 --root=$RPM_BUILD_ROOT
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %dir %{py_sitedir}/geventhttpclient
116 %{py_sitedir}/geventhttpclient/*.py[co]
117 %attr(755,root,root) %{py_sitedir}/geventhttpclient/*.so
118 %{py_sitedir}/%{module}-%{version}-py*.egg-info
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %doc AUTHORS CHANGES LICENSE
125 %{py3_sitedir}/%{module}
126 %{py3_sitedir}/%{module}-%{version}-py*.egg-info