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