Change-Id: Ic3fe37ecf329a08d8e77b21922b04f84b2bba57a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3753
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,138 @@ |
| 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 |
+BuildArch: noarch |
|
| 29 |
+ |
|
| 30 |
+%description |
|
| 31 |
+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+. |
|
| 32 |
+ |
|
| 33 |
+%package -n python3-boto |
|
| 34 |
+Summary: python-boto |
|
| 35 |
+BuildRequires: python3-devel |
|
| 36 |
+BuildRequires: python3-libs |
|
| 37 |
+BuildRequires: python3-setuptools |
|
| 38 |
+BuildRequires: python3-xml |
|
| 39 |
+%if %{with_check}
|
|
| 40 |
+BuildRequires: python3-requests |
|
| 41 |
+%endif |
|
| 42 |
+Requires: python3 |
|
| 43 |
+Requires: python3-libs |
|
| 44 |
+Requires: python3-requests |
|
| 45 |
+Requires: python3-xml |
|
| 46 |
+ |
|
| 47 |
+%description -n python3-boto |
|
| 48 |
+Python 3 version. |
|
| 49 |
+ |
|
| 50 |
+%prep |
|
| 51 |
+%setup -q -n boto-%{version}
|
|
| 52 |
+rm -rf ../p3dir |
|
| 53 |
+cp -a . ../p3dir |
|
| 54 |
+ |
|
| 55 |
+%build |
|
| 56 |
+python2 setup.py build |
|
| 57 |
+pushd ../p3dir |
|
| 58 |
+python3 setup.py build |
|
| 59 |
+popd |
|
| 60 |
+ |
|
| 61 |
+%install |
|
| 62 |
+pushd ../p3dir |
|
| 63 |
+python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
|
|
| 64 |
+for item in %{buildroot}/%{_bindir}/*
|
|
| 65 |
+ do mv ${item} "${item}-%{python3_version}" ;
|
|
| 66 |
+done |
|
| 67 |
+popd |
|
| 68 |
+python2 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
|
|
| 69 |
+ |
|
| 70 |
+%check |
|
| 71 |
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2) |
|
| 72 |
+$easy_install_2 nose |
|
| 73 |
+$easy_install_2 httpretty |
|
| 74 |
+$easy_install_2 mock |
|
| 75 |
+python2 ./tests/test.py unit |
|
| 76 |
+ |
|
| 77 |
+pushd ../p3dir |
|
| 78 |
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3) |
|
| 79 |
+$easy_install_3 nose |
|
| 80 |
+$easy_install_3 httpretty |
|
| 81 |
+$easy_install_3 mock |
|
| 82 |
+python3 ./tests/test.py unit |
|
| 83 |
+popd |
|
| 84 |
+ |
|
| 85 |
+%files |
|
| 86 |
+%defattr(-,root,root) |
|
| 87 |
+%{python2_sitelib}/*
|
|
| 88 |
+%{_bindir}/asadmin
|
|
| 89 |
+%{_bindir}/bundle_image
|
|
| 90 |
+%{_bindir}/cfadmin
|
|
| 91 |
+%{_bindir}/cq
|
|
| 92 |
+%{_bindir}/cwutil
|
|
| 93 |
+%{_bindir}/dynamodb_dump
|
|
| 94 |
+%{_bindir}/dynamodb_load
|
|
| 95 |
+%{_bindir}/elbadmin
|
|
| 96 |
+%{_bindir}/fetch_file
|
|
| 97 |
+%{_bindir}/glacier
|
|
| 98 |
+%{_bindir}/instance_events
|
|
| 99 |
+%{_bindir}/kill_instance
|
|
| 100 |
+%{_bindir}/launch_instance
|
|
| 101 |
+%{_bindir}/list_instances
|
|
| 102 |
+%{_bindir}/lss3
|
|
| 103 |
+%{_bindir}/mturk
|
|
| 104 |
+%{_bindir}/pyami_sendmail
|
|
| 105 |
+%{_bindir}/route53
|
|
| 106 |
+%{_bindir}/s3put
|
|
| 107 |
+%{_bindir}/sdbadmin
|
|
| 108 |
+%{_bindir}/taskadmin
|
|
| 109 |
+ |
|
| 110 |
+%files -n python3-boto |
|
| 111 |
+%defattr(-,root,root) |
|
| 112 |
+%{python3_sitelib}/*
|
|
| 113 |
+%{_bindir}/asadmin-%{python3_version}
|
|
| 114 |
+%{_bindir}/bundle_image-%{python3_version}
|
|
| 115 |
+%{_bindir}/cfadmin-%{python3_version}
|
|
| 116 |
+%{_bindir}/cq-%{python3_version}
|
|
| 117 |
+%{_bindir}/cwutil-%{python3_version}
|
|
| 118 |
+%{_bindir}/dynamodb_dump-%{python3_version}
|
|
| 119 |
+%{_bindir}/dynamodb_load-%{python3_version}
|
|
| 120 |
+%{_bindir}/elbadmin-%{python3_version}
|
|
| 121 |
+%{_bindir}/fetch_file-%{python3_version}
|
|
| 122 |
+%{_bindir}/glacier-%{python3_version}
|
|
| 123 |
+%{_bindir}/instance_events-%{python3_version}
|
|
| 124 |
+%{_bindir}/kill_instance-%{python3_version}
|
|
| 125 |
+%{_bindir}/launch_instance-%{python3_version}
|
|
| 126 |
+%{_bindir}/list_instances-%{python3_version}
|
|
| 127 |
+%{_bindir}/lss3-%{python3_version}
|
|
| 128 |
+%{_bindir}/mturk-%{python3_version}
|
|
| 129 |
+%{_bindir}/pyami_sendmail-%{python3_version}
|
|
| 130 |
+%{_bindir}/route53-%{python3_version}
|
|
| 131 |
+%{_bindir}/s3put-%{python3_version}
|
|
| 132 |
+%{_bindir}/sdbadmin-%{python3_version}
|
|
| 133 |
+%{_bindir}/taskadmin-%{python3_version}
|
|
| 134 |
+ |
|
| 135 |
+%changelog |
|
| 136 |
+* Tue Sep 12 2017 Xiaolin Li <xiaolinl@vmware.com> 2.48.0-1 |
|
| 137 |
+- Initial packaging for Photon |