Browse code

Bug 1892823: python-cassandra-driver , python-futres

Change-Id: Ia50bbdc92ab0d9ee011af0ad6bd10caf82ed0296
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2964
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>

harishspqr authored on 2017/06/16 09:07:38
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,81 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python2_version: %define python2_version %(python2 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
4
+
5
+Summary:        A modern, feature-rich and highly-tunable Python client library for Apache Cassandra (2.1+)
6
+Name:           python-cassandra-driver
7
+Version:        3.10.0
8
+Release:        1%{?dist}
9
+Url:            https://github.com/datastax/python-driver#datastax-python-driver-for-apache-cassandra
10
+License:        Apache 2.0
11
+Group:          Development/Languages/Python
12
+Vendor:         VMware, Inc.
13
+Distribution:   Photon
14
+Source0:        https://github.com/datastax/python-driver/archive/%{name}-%{version}.tar.gz
15
+%define sha1    python-cassandra-driver=1eb85a0979b6b480b53c7a725018cc0991599a60
16
+BuildArch:      x86_64
17
+BuildRequires:  python2
18
+BuildRequires:  cython
19
+BuildRequires:  python2-libs
20
+BuildRequires:  python2-devel
21
+BuildRequires:  python-setuptools
22
+BuildRequires:  python-pytest
23
+Requires:       python2
24
+Requires:       python2-libs
25
+
26
+%description
27
+A modern, feature-rich and highly-tunable Python client library for Apache Cassandra (2.1+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3.
28
+The driver supports Python 2.7, 3.3, 3.4, 3.5, and 3.6.
29
+
30
+%package -n     python3-cassandra-driver
31
+Summary:        python3-cassandra-driver
32
+BuildRequires:  python3
33
+BuildRequires:  cython3
34
+BuildRequires:  python3-devel
35
+BuildRequires:  python3-libs
36
+BuildRequires:  python3-pytest
37
+Requires:       python3
38
+Requires:       python3-libs
39
+
40
+%description -n python3-cassandra-driver
41
+Python 3 version.
42
+
43
+%prep
44
+%setup -q -n python-driver-%{version}
45
+rm -rf ../p3dir
46
+cp -a . ../p3dir
47
+
48
+%build
49
+python2 setup.py build --no-cython
50
+pushd ../p3dir
51
+python3 setup.py build --no-cython
52
+popd
53
+
54
+%install
55
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} --no-cython
56
+pushd ../p3dir
57
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} --no-cython
58
+popd
59
+
60
+%check
61
+PATH=%{buildroot}%{_bindir}:${PATH} \
62
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
63
+    py.test-%{python2_version} -v
64
+pushd ../p3dir
65
+PATH=%{buildroot}%{_bindir}:${PATH} \
66
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
67
+    py.test-%{python3_version} -v
68
+popd
69
+
70
+%files
71
+%defattr(-,root,root)
72
+%{python2_sitelib}/*
73
+
74
+%files -n python3-cassandra-driver
75
+%defattr(-,root,root,-)
76
+%{python3_sitelib}/*
77
+
78
+%changelog
79
+*   Thu Jun 15 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.10.0-1
80
+-   Initial packaging for Photon
0 81
new file mode 100644
... ...
@@ -0,0 +1,41 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+Name:           python-futures
2
+Version:        3.1.1
3
+Release:        1%{?dist}
4
+Summary:        Backport of the concurrent.futures package to Python 2.6 and 2.7
5
+License:        PSF
6
+Group:          Development/Languages/Python
7
+Url:            https://pypi.python.org/pypi/futures
8
+Source0:        https://pypi.python.org/packages/cc/26/b61e3a4eb50653e8a7339d84eeaa46d1e93b92951978873c220ae64d0733/futures-%{version}.tar.gz
9
+%define sha1    futures=e6815bea6a2881218df730347732f67ec5e89108
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+BuildRequires:  pkg-config
13
+BuildRequires:  python2
14
+BuildRequires:  python2-libs
15
+BuildRequires:  python-setuptools
16
+Requires:       python2
17
+Requires:       python2-libs
18
+BuildArch:	noarch
19
+%description
20
+Backport of the concurrent.futures package to Python 2.6 and 2.7
21
+
22
+%prep
23
+%setup -n futures-%{version}
24
+
25
+%build
26
+python2 setup.py build
27
+
28
+%install
29
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
30
+
31
+%check
32
+easy_install py
33
+
34
+%files
35
+%defattr(-,root,root,-)
36
+%{python2_sitelib}/*
37
+
38
+%changelog
39
+*   Thu Apr 06 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.1.1-1
40
+-   Initial version of python-fuse package for Photon.