]> git.pld-linux.org Git - packages/python-geventhttpclient.git/blame - python-geventhttpclient.spec
drop unneeded py3 copy
[packages/python-geventhttpclient.git] / python-geventhttpclient.spec
CommitLineData
07e55034
AM
1#
2# Conditional build:
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
7
8%define module geventhttpclient
9Summary: A high performance, concurrent HTTP client library
10Name: python-%{module}
11Version: 1.2.0
12Release: 1
13License: MIT
14Group: Libraries/Python
15Source0: https://pypi.python.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
16# Source0-md5: 1b3070e09b6e50fce929771f3f4fc9a6
17URL: https://pypi.python.org/pypi/geventhttpclient
7dc0e0a6 18BuildRequires: python-gevent
07e55034
AM
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.612
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-certifi
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-devel
30BuildRequires: python3-modules
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-certifi
34%endif
35%endif
36Requires: python-modules
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
871575a9 40A high performance, concurrent HTTP client library for Python using
07e55034
AM
41gevent.
42
871575a9 43geventhttpclient use a fast HTTP parser, written in C, originating
07e55034
AM
44from nginx, extracted and modified by Joyent.
45
46geventhttpclient has been specifically designed for high concurrency,
47streaming and support HTTP 1.1 persistent connections. More generally
48it is designed for efficiently pulling from REST APIs and streaming
871575a9 49API's like Twitter's.
07e55034
AM
50
51Safe SSL support is provided by default.
52
53%package -n python3-%{module}
54Summary: A high performance, concurrent HTTP client library
55Group: Libraries/Python
56Requires: python3-modules
57
58%description -n python3-%{module}
871575a9 59A high performance, concurrent HTTP client library for Python using
07e55034
AM
60gevent.
61
871575a9 62geventhttpclient use a fast HTTP parser, written in C, originating
07e55034
AM
63from nginx, extracted and modified by Joyent.
64
65geventhttpclient has been specifically designed for high concurrency,
66streaming and support HTTP 1.1 persistent connections. More generally
67it is designed for efficiently pulling from REST APIs and streaming
871575a9 68API's like Twitter's.
07e55034
AM
69
70Safe SSL support is provided by default.
71
72%prep
73%setup -q -n %{module}-%{version}
74
07e55034
AM
75%build
76%if %{with python2}
77CC="%{__cc}" \
78CFLAGS="%{rpmcppflags} %{rpmcflags}" \
79%{__python} setup.py build --build-base build-2 %{?with_tests:test}
80%endif
81
82%if %{with python3}
83CC="%{__cc}" \
84CFLAGS="%{rpmcppflags} %{rpmcflags}" \
85%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
86%endif
87
88%install
89rm -rf $RPM_BUILD_ROOT
90
91%if %{with python2}
92%{__python} setup.py \
93 build --build-base build-2 \
94 install --skip-build \
95 --optimize=2 \
96 --root=$RPM_BUILD_ROOT
97
98%py_postclean
99%endif
100
101%if %{with python3}
102%{__python3} setup.py \
103 build --build-base build-3 \
104 install --skip-build \
105 --optimize=2 \
106 --root=$RPM_BUILD_ROOT
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%if %{with python2}
113%files
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
07e55034
AM
118%{py_sitedir}/%{module}-%{version}-py*.egg-info
119%endif
07e55034
AM
120
121%if %{with python3}
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
127%endif
This page took 0.106994 seconds and 4 git commands to generate.