%define name python3-boto %define srcname boto %define version 2.49.0 %define release 1 %{!?dotests: %define dotests 1} %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: A simple, lightweight interface to Amazon Web Services Name: %{name} Version: %{version} Release: %{release} #Source0: http://pypi.python.org/packages/source/b/boto/%{srcname}-%{version}.tar.gz Source0: https//github.com/boto/boto/archive/%{version}.tar.gz Source1: boto-mit-license.txt License: MIT URL: https://github.com/boto/boto Group: Development/Languages BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Provides: python3-boto = %{version}-%{release} Prefix: %{_prefix} BuildRequires: python3 >= 3.7.4 BuildRequires: python3-devel >= 3.7.4 BuildArch: noarch Requires: python3 >= 3.7.4 %description 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. %prep %setup -q -n %{srcname}-%{version} cp -p %{SOURCE1} . %build export OBJECT_MODE=64 python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} #Confilicting with older binary file renamed cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for rn_bin in $(ls) do mv $rn_bin "$rn_bin"-3 done %check #For testing install httpretty using below command #python3 -m pip install httppretty python3 tests/test.py default %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc README.rst boto-mit-license.txt %doc docs %{_bindir}/* %{python_sitelib}/* %changelog * Mon Jan 20 2020 Ashwini Chandrappa - 2.49.0-1 -Build with python3 * Thu May 25 2016 Ravi Hirekurabar - 2.34.0-1 - first version for AIX V6.1 and higher