%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_minor 16 %global py_major 3.9 %global python_major python%{py_major} %global pkgname prettytable %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 0.7.2 Release: 2 Summary: A simple Python library for easily displaying tabular data in a visually appealing ASCII table format License: BSD (3 clause) URL: http://code.google.com/p/prettytable Source0: https://files.pythonhosted.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} %description PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGELOG COPYING PKG-INFO README %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Tue Mar 7 2023 Sangeetha Bandi - 0.7.2-2 - prettytable for python3.9 * Thu Nov 7 2019 Ashwini Chandrappa -0.7.2-1 -Build with Python3 * Thu Jun 16 2016 Reshma V Kumar -0.7.2-1 * Wed May 25 2016 Ravi Hirekurabar - 0.7.2-1 - first version for AIX V6.1 and higher