#Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec #%{!?dotests: %define dotests 1} %define name python3-futures3 %define srcname futures3 %define version 1.0.0 %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: Backport of the concurrent.futures package from Python 3.2 Name: %{name} Version: %{version} Release: %{release} Source0: http://pypi.python.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz URL: https://pypi.python.org/pypi/%{srcname} License: BSD Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} Requires: python3 >= 3.7.4 BuildArch: noarch %description This is a backport of the concurrent.futures package from Python 3.2. The module provides a high-level interface for asynchronously executing callables. %prep %setup -q -n %{srcname}-%{version} %build export OBJECT_MODE=64 python3 setup.py build if [ "%{dotests}" == 1 ] then python3 setup.py test fi %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc PKG-INFO README.rst %{python_sitelib}/* %changelog * Wed Nov 27 2019 Harshita jain - 1.0.0.-1 - Update the latest version - Build with python3 * Wed Aug 24 2016 Dylan McDougall - 3.0.5-1 - first version for AIX V6.1 and higher