%{!?dotests: %define dotests 1} %define name python3-s3transfer %define srcname s3transfer %define version 0.2.1 %define release 1 %define is_python %(test -e /usr/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_64 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %endif Summary: S3transfer is a Python library for managing Amazon S3 transfers Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: UNKNOWN Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Michael Foord Url: http://www.voidspace.org.uk/python/mock/ BuildRequires: python3 >= 3.7.4-1, python3-devel >= 3.7.4-1 BuildRequires: python3-mock >= 3.0.5-1 BuildRequires: python3-botocore >= 1.13.46-1 Requires: python3 >= 3.7.4-1, python3-botocore >= 1.13.46-1 %description S3transfer is a Python library for managing Amazon S3 transfers. %prep %setup -n %{srcname}-%{version} %build 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} %if %{dotests} %check python3 setup.py test || true %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE.txt README.rst %{python_sitelib}/* %changelog * Tue Jan 07 2020 Reshma V Kumar - 0.2.1-1 - Update to latest version - Rebuild with python3 * Tue May 9 2017 Ravi Sooryakanth Hirekoorabar - 0.1.10 - First build for AIX 6.1