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