Browse code

Adding python-boto and its dependecies

Change-Id: Iacdbf158f8ab7d1ecba49845fc1bb375a821427d
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4531
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>

Kumar Kaushik authored on 2017/12/19 11:51:33
Showing 4 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,141 @@
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:        Amazon Web Services Library.
5
+Name:           python-boto
6
+Version:        2.48.0
7
+Release:        1%{?dist}
8
+License:        MIT License
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Url:            https://pypi.python.org/pypi/boto/2.48.0
13
+Source0:        https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
14
+%define         sha1 boto=9cd6fb5b28a1e2a66c4fa4715bcce251e4ea8434
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-six
20
+BuildRequires:  python-xml
21
+%if %{with_check}
22
+BuildRequires:  python-requests
23
+%endif
24
+Requires:       python2
25
+Requires:       python2-libs
26
+Requires:       python-requests
27
+Requires:       python-xml
28
+Requires:       python-botocore
29
+Requires:       python-jmespath
30
+Requires:       python-dateutil
31
+BuildArch:      noarch
32
+
33
+%description
34
+Boto is a Python package that provides interfaces to Amazon Web Services. Currently, all features work with Python 2.6 and 2.7. Work is under way to support Python 3.3+ in the same codebase. Modules are being ported one at a time with the help of the open source community, so please check below for compatibility with Python 3.3+.
35
+
36
+%package -n     python3-boto
37
+Summary:        python-boto
38
+BuildRequires:  python3-devel
39
+BuildRequires:  python3-libs
40
+%if %{with_check}
41
+BuildRequires:  python3-requests
42
+%endif
43
+Requires:       python3
44
+Requires:       python3-libs
45
+Requires:       python3-requests
46
+Requires:       python3-botocore
47
+Requires:       python3-jmespath
48
+Requires:       python3-dateutil
49
+
50
+%description -n python3-boto
51
+Python 3 version.
52
+
53
+%prep
54
+%setup -q -n boto-%{version}
55
+rm -rf ../p3dir
56
+cp -a . ../p3dir
57
+
58
+%build
59
+python2 setup.py build
60
+pushd ../p3dir
61
+python3 setup.py build
62
+popd
63
+
64
+%install
65
+pushd ../p3dir
66
+python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
67
+for item in %{buildroot}/%{_bindir}/*
68
+    do mv ${item} "${item}-%{python3_version}" ;
69
+done
70
+popd
71
+python2 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
72
+
73
+%check
74
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
75
+$easy_install_2 nose
76
+$easy_install_2 httpretty
77
+$easy_install_2 mock
78
+python2 ./tests/test.py unit
79
+
80
+pushd ../p3dir
81
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
82
+$easy_install_3 nose
83
+$easy_install_3 httpretty
84
+$easy_install_3 mock
85
+python3 ./tests/test.py unit
86
+popd
87
+
88
+%files
89
+%defattr(-,root,root)
90
+%{python2_sitelib}/*
91
+%{_bindir}/asadmin
92
+%{_bindir}/bundle_image
93
+%{_bindir}/cfadmin
94
+%{_bindir}/cq
95
+%{_bindir}/cwutil
96
+%{_bindir}/dynamodb_dump
97
+%{_bindir}/dynamodb_load
98
+%{_bindir}/elbadmin
99
+%{_bindir}/fetch_file
100
+%{_bindir}/glacier
101
+%{_bindir}/instance_events
102
+%{_bindir}/kill_instance
103
+%{_bindir}/launch_instance
104
+%{_bindir}/list_instances
105
+%{_bindir}/lss3
106
+%{_bindir}/mturk
107
+%{_bindir}/pyami_sendmail
108
+%{_bindir}/route53
109
+%{_bindir}/s3put
110
+%{_bindir}/sdbadmin
111
+%{_bindir}/taskadmin
112
+
113
+%files -n python3-boto
114
+%defattr(-,root,root)
115
+%{python3_sitelib}/*
116
+%{_bindir}/asadmin-%{python3_version}
117
+%{_bindir}/bundle_image-%{python3_version}
118
+%{_bindir}/cfadmin-%{python3_version}
119
+%{_bindir}/cq-%{python3_version}
120
+%{_bindir}/cwutil-%{python3_version}
121
+%{_bindir}/dynamodb_dump-%{python3_version}
122
+%{_bindir}/dynamodb_load-%{python3_version}
123
+%{_bindir}/elbadmin-%{python3_version}
124
+%{_bindir}/fetch_file-%{python3_version}
125
+%{_bindir}/glacier-%{python3_version}
126
+%{_bindir}/instance_events-%{python3_version}
127
+%{_bindir}/kill_instance-%{python3_version}
128
+%{_bindir}/launch_instance-%{python3_version}
129
+%{_bindir}/list_instances-%{python3_version}
130
+%{_bindir}/lss3-%{python3_version}
131
+%{_bindir}/mturk-%{python3_version}
132
+%{_bindir}/pyami_sendmail-%{python3_version}
133
+%{_bindir}/route53-%{python3_version}
134
+%{_bindir}/s3put-%{python3_version}
135
+%{_bindir}/sdbadmin-%{python3_version}
136
+%{_bindir}/taskadmin-%{python3_version}
137
+
138
+%changelog
139
+*   Mon Dec 18 2017 Kumar Kaushik <kaushikk@vmware.com> 2.48.0-1
140
+-   Moving to 1.0 branch from dev branch.
0 141
new file mode 100644
... ...
@@ -0,0 +1,70 @@
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:        Amazon Web Services Library.
5
+Name:           python-botocore
6
+Version:        1.8.15
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/botocore
13
+Source0:        https://github.com/boto/botocore/archive/botocore-%{version}.tar.gz
14
+%define         sha1 botocore=6ecad01c8235e53d22da5e2da65704cede758550
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+Requires:       python2
20
+Requires:       python2-libs
21
+BuildArch:      noarch
22
+
23
+%description
24
+A low-level interface to a growing number of Amazon Web Services. The botocore package is the foundation for the AWS CLI as well as boto3.
25
+
26
+%package -n     python3-botocore
27
+Summary:        python3-botocore
28
+BuildRequires:  python3-devel
29
+BuildRequires:  python3-libs
30
+Requires:       python3
31
+Requires:       python3-libs
32
+
33
+%description -n python3-botocore
34
+Python 3 version.
35
+
36
+%prep
37
+%setup -q -n botocore-%{version}
38
+rm -rf ../p3dir
39
+cp -a . ../p3dir
40
+
41
+%build
42
+python2 setup.py build
43
+pushd ../p3dir
44
+python3 setup.py build
45
+popd
46
+
47
+%install
48
+pushd ../p3dir
49
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
50
+popd
51
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
52
+
53
+%check
54
+python2 setup.py test
55
+pushd ../p3dir
56
+python3 setup.py test
57
+popd
58
+
59
+%files
60
+%defattr(-,root,root)
61
+%{python2_sitelib}/*
62
+
63
+%files -n python3-botocore
64
+%defattr(-,root,root)
65
+%{python3_sitelib}/*
66
+
67
+%changelog
68
+*   Mon Dec 18 2017 Kumar Kaushik <kaushikk@vmware.com> 1.8.15-1
69
+-   Initial packaging for photon.
0 70
new file mode 100644
... ...
@@ -0,0 +1,73 @@
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:        Extensions to the standard Python datetime module
5
+Name:           python-dateutil
6
+Version:        2.6.1
7
+Release:        1%{?dist}
8
+License:        Simplified BSD
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Url:            https://pypi.python.org/pypi/python-dateutil
13
+Source0:        https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-%{version}.tar.gz
14
+%define         sha1 python-dateutil=db2ace298dee7e47fd720ed03eb790885347bf4e
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-six
20
+Requires:       python2
21
+Requires:       python2-libs
22
+Requires:       python-six
23
+BuildArch:      noarch
24
+
25
+%description
26
+The dateutil module provides powerful extensions to the datetime module available in the Python standard library.
27
+
28
+%package -n     python3-dateutil
29
+Summary:        python3-dateutil
30
+BuildRequires:  python3-devel
31
+BuildRequires:  python3-libs
32
+Requires:       python3
33
+Requires:       python3-libs
34
+Requires:       python3-six
35
+
36
+%description -n python3-dateutil
37
+Python 3 version.
38
+
39
+%prep
40
+%setup -q -n python-dateutil-%{version}
41
+rm -rf ../p3dir
42
+cp -a . ../p3dir
43
+
44
+%build
45
+python2 setup.py build
46
+pushd ../p3dir
47
+python3 setup.py build
48
+popd
49
+
50
+%install
51
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
52
+pushd ../p3dir
53
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+popd
55
+
56
+%check
57
+python2 setup.py test
58
+pushd ../p3dir
59
+python3 setup.py test
60
+popd
61
+
62
+%files
63
+%defattr(-,root,root)
64
+%{python2_sitelib}/*
65
+
66
+%files -n python3-dateutil
67
+%defattr(-,root,root)
68
+%{python3_sitelib}/*
69
+
70
+%changelog
71
+*   Mon Dec 18 2017 Kumar Kaushik <kaushikk@vmware.com> 2.6.1-1
72
+-   Initial packaging for photon.
0 73
new file mode 100644
... ...
@@ -0,0 +1,74 @@
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:        Query Language for JSON
5
+Name:           python-jmespath
6
+Version:        0.9.3
7
+Release:        1%{?dist}
8
+License:        MIT
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Url:            https://pypi.python.org/pypi/jmespath
13
+Source0:        https://pypi.python.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-%{version}.tar.gz
14
+%define         sha1 jmespath=eca7ba2e8d4fc50239973b59e07f9f527e0c0839
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+Requires:       python2
20
+Requires:       python2-libs
21
+BuildArch:      noarch
22
+
23
+%description
24
+JMESPath (pronounced “james path”) allows you to declaratively specify how to extract elements from a JSON document.
25
+
26
+%package -n     python3-jmespath
27
+Summary:        python-jmespath
28
+BuildRequires:  python3-devel
29
+BuildRequires:  python3-libs
30
+Requires:       python3
31
+Requires:       python3-libs
32
+
33
+%description -n python3-jmespath
34
+Python 3 version.
35
+
36
+%prep
37
+%setup -q -n jmespath-%{version}
38
+rm -rf ../p3dir
39
+cp -a . ../p3dir
40
+
41
+%build
42
+python2 setup.py build
43
+pushd ../p3dir
44
+python3 setup.py build
45
+popd
46
+
47
+%install
48
+pushd ../p3dir
49
+python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
50
+for item in %{buildroot}/%{_bindir}/*
51
+    do mv ${item} "${item}-%{python3_version}" ;
52
+done
53
+popd
54
+python2 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
55
+
56
+%check
57
+python2 setup.py test
58
+pushd ../p3dir
59
+python3 setup.py test
60
+popd
61
+
62
+%files
63
+%defattr(-,root,root)
64
+%{python2_sitelib}/*
65
+%{_bindir}/jp.py
66
+
67
+%defattr(-,root,root)
68
+%{python3_sitelib}/*
69
+%{_bindir}/jp.py-%{python3_version}
70
+
71
+%changelog
72
+*   Mon Dec 18 2017 Kumar Kaushik <kaushikk@vmware.com> 0.9.3-1
73
+-   Initial packaging for photon.