[python-boto/el6: 5/7] Add python3-boto
gholms
gholms at fedoraproject.org
Sat Aug 23 18:39:08 UTC 2014
commit 09d0c11598a99d2c9acd2c349da759d1e4fe62ec
Author: Garrett Holmstrom <gholms at devzero.com>
Date: Fri Aug 22 14:13:49 2014 -0700
Add python3-boto
https://bugzilla.redhat.com/show_bug.cgi?id=1024363
python-boto.spec | 79 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 72 insertions(+), 7 deletions(-)
---
diff --git a/python-boto.spec b/python-boto.spec
index 3d63f32..88c2f96 100644
--- a/python-boto.spec
+++ b/python-boto.spec
@@ -1,4 +1,15 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora}
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%if %{with python3}
+%{!?__python3: %global __python3 /usr/bin/python3}
+%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif # with python3
Summary: A simple, lightweight interface to Amazon Web Services
Name: python-boto
@@ -11,8 +22,14 @@ Source0: http://pypi.python.org/packages/source/b/boto/boto-%{version}.ta
# Taken from sourcecode 2014-07-31
Source1: boto-mit-license.txt
-BuildRequires: python-devel
+BuildRequires: python2-devel
BuildRequires: python-setuptools
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif # with python3
+
+Provides: python2-boto = %{version}-%{release}
BuildArch: noarch
@@ -26,20 +43,60 @@ and depth of Amazon Web Services. In addition, boto provides support
for other public services such as Google Storage in addition to private
cloud systems like Eucalyptus, OpenStack and Open Nebula.
+
+%if %{with python3}
+%package -n python3-boto
+Summary: A simple, lightweight interface to Amazon Web Services
+
+
+%description -n python3-boto
+Boto is a Python package that provides interfaces to Amazon Web Services.
+It supports over thirty services, such as S3 (Simple Storage Service),
+SQS (Simple Queue Service), and EC2 (Elastic Compute Cloud) via their
+REST and Query APIs. The goal of boto is to support the full breadth
+and depth of Amazon Web Services. In addition, boto provides support
+for other public services such as Google Storage in addition to private
+cloud systems like Eucalyptus, OpenStack and Open Nebula.
+%endif # with python3
+
+
%prep
%setup -q -n boto-%{version}
cp -p %{SOURCE1} .
rm -r boto.egg-info
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+
%build
-%{__python} setup.py build
+%{__python2} setup.py build
+
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with python3
+
%install
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%if %{with python3}
+# Must do the python3 install first because the scripts in /usr/bin are
+# overwritten with every setup.py install and they only work with python2.
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif # with python3
+
+%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
+
%files
-%{!?_licensedir:%global license %%doc}
+# For some reason this definition really does have to go in this section.
+%{!?_licensedir: %global license %%doc}
%license boto-mit-license.txt
%doc README.rst
%{_bindir}/asadmin
@@ -63,12 +120,20 @@ rm -r boto.egg-info
%{_bindir}/s3put
%{_bindir}/sdbadmin
%{_bindir}/taskadmin
-%{python_sitelib}/boto
-%{python_sitelib}/boto*.egg-info
+%{python2_sitelib}/boto*
+
+
+%if %{with python3}
+%files -n python3-boto
+%license boto-mit-license.txt
+%{python3_sitelib}/boto*
+%endif # with python3
+
%changelog
* Thu Aug 21 2014 Garrett Holmstrom <gholms at fedoraproject.org> - 2.32.1-1
- Updated to 2.32.1 (RH #1126056, RH #1132348)
+- Added python3-boto (RH #1024363)
* Thu Jul 31 2014 Tom Callaway <spot at fedoraproject.org> - 2.27.0-3
- fix license handling
More information about the scm-commits
mailing list