%{!?dotests: %define dotests 1} %define __python3 /opt/freeware/bin/python3 %define python_sitearch %(python3_32 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: python3-dateutil Version: 2.8.0 Release: 1 Summary: Extensions to the standard Python datetime module BuildArch: noarch Group: Development/Languages License: BSD URL: https://pypi.python.org/pypi/python-dateutil/2.8.0 Source0: python-dateutil-2.8.0.tar.gz #BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python3 >= 3.7.4, python3-pytest >= 5.3.1 Requires: python3 >= 3.7.4, python3-six >= 1.13.0 %description The dateutil module provides powerful extensions to the datetime module available in the Python3 standard library. %prep %setup0 -q -n python-dateutil-%{version} export PYTHONPATH=/opt/freeware/lib/python3.zip:/opt/freeware/lib/python3:/opt/freeware/lib/python3/plat-aix6:/opt/freeware/lib/python3/lib-tk:/opt/freeware/lib/python3/lib-old:/opt/freeware/lib/python3/lib-dynload:/opt/freeware/lib/python3/site-packages:/opt/freeware/lib/python3/config %build %{__python3} setup.py build %install rm -rf %{buildroot} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} #For Running testcases install freezegun, hypothesis #install using 'python3 -m pip install ' if [ "%{dotests}" == 1 ] then (%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning || true ) fi %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{python_sitearch}/* %changelog *Tue Dec 31 2019 Ashwini Chandrappa2.8.0 -Build with python3 *Tue May 9 2017 Sangamesh Mallayya 2.6.0-1 - Initial port to AIX.