Browse code

Adding boto3 package

Change-Id: I05d4b38c0754b5fbc3bcce45757ce299250daeef
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4608
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Kumar Kaushik authored on 2018/01/06 11:10:13
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,78 @@
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
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
+
4
+Summary:        The AWS SDK for Python
5
+Name:           python-boto3
6
+Version:        1.5.9
7
+Release:        1%{?dist}
8
+License:        Apache 2.0
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Url:            https://github.com/boto/boto3
13
+Source0:        https://github.com/boto/boto3/archive/boto3-%{version}.tar.gz
14
+%define         sha1 boto3=31713c7ba10901494321e2a11fe19fb86b0176d5
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+Requires:       python2
20
+Requires:       python2-libs
21
+Requires:       python-botocore
22
+Requires:       python-jmespath
23
+Requires:       python-dateutil
24
+BuildArch:      noarch
25
+
26
+%description
27
+Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, 
28
+which allows Python developers to write software that makes use of services like 
29
+Amazon S3 and Amazon EC2
30
+
31
+%package -n     python3-boto3
32
+Summary:        python3-boto3
33
+BuildRequires:  python3-devel
34
+BuildRequires:  python3-libs
35
+Requires:       python3
36
+Requires:       python3-libs
37
+Requires:       python3-botocore
38
+Requires:       python3-jmespath
39
+Requires:       python3-dateutil
40
+
41
+%description -n python3-boto3
42
+Python 3 version.
43
+
44
+%prep
45
+%setup -q -n boto3-%{version}
46
+rm -rf ../p3dir
47
+cp -a . ../p3dir
48
+
49
+%build
50
+python2 setup.py build
51
+pushd ../p3dir
52
+python3 setup.py build
53
+popd
54
+
55
+%install
56
+pushd ../p3dir
57
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
58
+popd
59
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
60
+
61
+%check
62
+python2 setup.py test
63
+pushd ../p3dir
64
+python3 setup.py test
65
+popd
66
+
67
+%files
68
+%defattr(-,root,root)
69
+%{python2_sitelib}/*
70
+
71
+%files -n python3-boto3
72
+%defattr(-,root,root)
73
+%{python3_sitelib}/*
74
+
75
+%changelog
76
+*   Fri Jan 05 2017 Kumar Kaushik <kaushikk@vmware.com> 1.5.9-1
77
+-   Initial packaging for photon.