%{!?dotests: %define dotests 1} #Jsonschema is required to run testcases. Install it using the following command # python3 -m pip install jsonschema %define name python3-botocore %define srcname botocore %define version 1.13.46 %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 && 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: Low-level, data-driven core of boto 3 Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: Apache License 2.0 Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Jason Pellerin Url: http://readthedocs.org/docs/nose/ BuildRequires: python3-nose >= 1.3.7-1 BuildRequires: python3-jmespath >= 0.9.4-1 BuildRequires: python3 >= 3.7.4-1, python3-devel >= 3.7.4-1 Requires: python3 >= 3.7.4-1 Requires: python3-jmespath >= 0.9.4-1 Requires: python3-dateutil >= 2.8.0-1 Requires: python3-docutils >= 0.15.2-1 Requires: python3-urllib3 >= 1.25.7-1 %description Botocore is a low-level interface to a growing number of Amazon Web Services. Botocore serves as the foundation for the AWS-CLI command line utilities. It will also play an important role in the boto3.x project. The botocore package is compatible with Python versions 2.6.5, Python 2.7.x, and Python 3.3.x and higher. %prep %setup -q -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 export PYTHONPATH=%{buildroot}%{python_sitelib} nosetests-3 --with-coverage --cover-erase --cover-package botocore --with-xunit --cover-xml -v tests/unit/ tests/functional/ || true %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc LICENSE.txt PKG-INFO README.rst %{python_sitelib}/* %changelog * Fri Jan 03 2020 Reshma V Kumar - 1.13.46-1 - Update to latest version - Build with python3 * Thu Jun 10 2013 Tristan Delhalle - 1.3.0-1 - first version for AIX V6.1 and higher