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