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