]> git.pld-linux.org Git - packages/python-geventhttpclient.git/blob - python-geventhttpclient.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-geventhttpclient.git] / python-geventhttpclient.spec
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
9 Summary:        A high performance, concurrent HTTP client library
10 Name:           python-%{module}
11 Version:        1.2.0
12 Release:        1
13 License:        MIT
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.710
21 %if %{with python2}
22 BuildRequires:  python-devel
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-certifi
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel
30 BuildRequires:  python3-modules
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-certifi
34 %endif
35 %endif
36 Requires:       python-modules
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 A high performance, concurrent HTTP client library for Python using
41 gevent.
42
43 geventhttpclient use a fast HTTP parser, written in C, originating
44 from nginx, extracted and modified by Joyent.
45
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
49 API's like Twitter's.
50
51 Safe SSL support is provided by default.
52
53 %package -n python3-%{module}
54 Summary:        A high performance, concurrent HTTP client library
55 Group:          Libraries/Python
56 Requires:       python3-modules
57
58 %description -n python3-%{module}
59 A high performance, concurrent HTTP client library for Python using
60 gevent.
61
62 geventhttpclient use a fast HTTP parser, written in C, originating
63 from nginx, extracted and modified by Joyent.
64
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
68 API's like Twitter's.
69
70 Safe SSL support is provided by default.
71
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %build
76 %if %{with python2}
77 CC="%{__cc}" \
78 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
79 %py_build %{?with_tests:test}
80 %endif
81
82 %if %{with python3}
83 CC="%{__cc}" \
84 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
85 %py3_build %{?with_tests:test}
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %py_install
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %dir %{py_sitedir}/geventhttpclient
108 %{py_sitedir}/geventhttpclient/*.py[co]
109 %attr(755,root,root) %{py_sitedir}/geventhttpclient/*.so
110 %{py_sitedir}/%{module}-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-%{module}
115 %defattr(644,root,root,755)
116 %doc AUTHORS CHANGES LICENSE
117 %{py3_sitedir}/%{module}
118 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
119 %endif
This page took 0.108566 seconds and 4 git commands to generate.