]> git.pld-linux.org Git - packages/python-cassandra.git/blob - python-cassandra.spec
c64473ec05488a90e6aa485c20d6d41c69e2feb1
[packages/python-cassandra.git] / python-cassandra.spec
1 # TODO:
2 # - Fix tests (seems require mock <= 1.0.1)
3 # - Cleanup cython leftovers
4 #
5 # Conditional build:
6 %bcond_with     doc             # don't build doc
7 %bcond_with     tests   # do not perform "make test"
8 %bcond_without  python2 # CPython 2.x module
9 %bcond_without  python3 # CPython 3.x module
10 # NOTE: 3.7.1 R:  mock<=1.0.1 for tests :/
11
12 %define         module  cassandra
13 Summary:        A Python client driver for Apache Cassandra
14 Summary(pl.UTF-8):      Moduł Pythona dla klientów Apache Cassandra
15 Name:           python-%{module}
16 Version:        3.20.0
17 Release:        6
18 License:        Apache v2.0
19 Group:          Libraries/Python
20 Source0:        https://github.com/datastax/python-driver/archive/%{version}/%{module}-%{version}.tar.gz
21 # Source0-md5:  e812c012c153c3dd1bdb49378cb9ffc5
22 URL:            http://github.com/datastax/python-driver
23 BuildRequires:  libev-devel
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.710
26 %if %{with python2}
27 ## BuildRequires:       python-futures
28 BuildRequires:  python-PyYAML
29 BuildRequires:  python-devel
30 BuildRequires:  python-distribute
31 BuildRequires:  python-pytz
32 BuildRequires:  python-six
33 BuildRequires:  python-sure
34 Requires:       python-futures
35 Requires:       python-modules
36 #  mock<=1.0.1
37
38 %endif
39 %if %{with python3}
40 # BuildRequires:        python3-futures  # Only 3.0 and 3.1
41 BuildRequires:  python3-PyYAML
42 BuildRequires:  python3-devel
43 BuildRequires:  python3-mock
44 BuildRequires:  python3-modules
45 BuildRequires:  python3-pytz
46 BuildRequires:  python3-six >= 1.6
47 BuildRequires:  python3-sure
48 %endif
49 Suggests:       python-blist
50
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 A Python client driver for Apache Cassandra. This driver works
55 exclusively with the Cassandra Query Language v3 (CQL3) and
56 Cassandra's native protocol. Cassandra versions 1.2 through 2.1 are
57 supported. The driver supports Python 2.6, 2.7, 3.3, and 3.4.
58
59 %description -l pl.UTF-8
60 Interfejs klienta dla Apache Cassandra. Działa wyłacznie w oparciu
61 Cassandra Query Languages v3 (CQL3) i z natywnym protkołem Cassandry.
62 Wspiera Cassndry w wersjach od 1.2 w góre i działa z Pythonem 2.6,
63 2.7, 3.3, 3.4 .
64
65 %package -n python3-%{module}
66 Summary:        A Python client driver for Apache Cassandra
67 Summary(pl.UTF-8):      Moduł Pythona dla klientów Apache Cassandra
68 Group:          Libraries/Python
69 Requires:       python3-six >= 1.6
70 Suggests:       python3-blist
71
72
73 %description -n python3-%{module}
74 A Python client driver for Apache Cassandra. This driver works
75 exclusively with the Cassandra Query Language v3 (CQL3) and
76 Cassandra's native protocol. Cassandra versions 1.2 through 2.1 are
77 supported. The driver supports Python 2.6, 2.7, 3.3, and 3.4.
78
79 %description -n python3-%{module} -l pl.UTF-8
80 Interfejs klienta dla Apache Cassandra. Działa wyłacznie w oparciu
81 Cassandra Query Languages v3 (CQL3) i z natywnym protkołem Cassandry.
82 Wspiera Cassndry w wersjach od 1.2 w góre i działa z Pythonem 2.6,
83 2.7, 3.3, 3.4 .
84
85
86 %package apidocs
87 Summary:        %{module} API documentation
88 Summary(pl.UTF-8):      Dokumentacja API %{module}
89 Group:          Documentation
90
91
92 %description apidocs
93 API documentation for %{module}.
94
95 %description apidocs -l pl.UTF-8
96 Dokumentacja API %{module}.
97
98 %prep
99 %setup -q -n python-driver-%{version}
100
101 %build
102 %if %{with python2}
103 %py_build %{?with_tests:test}
104 %endif
105
106 %if %{with python3}
107 %py3_build %{?with_tests:test}
108 %endif
109
110 %if %{with doc}
111 cd docs
112 %{__make} -j1 html
113 rm -rf _build/html/_sources
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 %if %{with python2}
119 %py_install
120 %py_postclean
121 %endif
122
123 %if %{with python3}
124 %py3_install
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{with python2}
131 %files
132 %defattr(644,root,root,755)
133 %doc README.rst
134 %dir %{py_sitedir}/%{module}
135 %{py_sitedir}/%{module}/*.py[co]
136 %{py_sitedir}/%{module}/*.pxd
137 %{py_sitedir}/%{module}/*.pyx
138 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
139 %dir %{py_sitedir}/%{module}/cqlengine
140 %{py_sitedir}/%{module}/cqlengine/*.py[co]
141 %dir %{py_sitedir}/%{module}/datastax
142 %{py_sitedir}/%{module}/datastax/*.py[co]
143 %dir %{py_sitedir}/%{module}/datastax/cloud
144 %{py_sitedir}/%{module}/datastax/cloud/*.py[co]
145 %dir %{py_sitedir}/%{module}/io
146 %{py_sitedir}/%{module}/io/*.py[co]
147 %attr(755,root,root) %{py_sitedir}/%{module}/io/libevwrapper.so
148 %{py_sitedir}/cassandra_driver-%{version}-py*.egg-info
149 %endif
150
151 %if %{with python3}
152 %files -n python3-%{module}
153 %defattr(644,root,root,755)
154 %doc README.rst
155 %dir %{py3_sitedir}/%{module}
156 %{py3_sitedir}/%{module}/*.py
157 %{py3_sitedir}/%{module}/*.pxd
158 %{py3_sitedir}/%{module}/*.pyx
159 %attr(755,root,root) %{py3_sitedir}/%{module}/*.cpython-*.so
160 %{py3_sitedir}/%{module}/__pycache__/
161 %dir %{py3_sitedir}/%{module}/io
162 %{py3_sitedir}/%{module}/io/*.py
163 %attr(755,root,root) %{py3_sitedir}/%{module}/io/libevwrapper.cpython-*.so
164 %{py3_sitedir}/%{module}/io/__pycache__
165 %dir %{py3_sitedir}/%{module}/cqlengine
166 %{py3_sitedir}/%{module}/cqlengine/*.py
167 %{py3_sitedir}/%{module}/cqlengine/__pycache__
168 %dir %{py3_sitedir}/%{module}/datastax
169 %{py3_sitedir}/%{module}/datastax/*.py
170 %{py3_sitedir}/%{module}/datastax/__pycache__
171 %dir %{py3_sitedir}/%{module}/datastax/cloud
172 %{py3_sitedir}/%{module}/datastax/cloud/*.py
173 %{py3_sitedir}/%{module}/datastax/cloud/__pycache__
174 %{py3_sitedir}/cassandra_driver-%{version}-py*.egg-info
175 %endif
176
177 %if %{with doc}
178 %files apidocs
179 %defattr(644,root,root,755)
180 %doc docs/_build/html/*
181 %endif
This page took 0.037493 seconds and 2 git commands to generate.