%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 16 %global python_major python%{py_major} %global pkgname wcwidth %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") %global python3_sitearch64 %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 0.1.7 Release: 2 Summary: Measures number of Terminal column cells of wide-character codes License: MIT URL: https://pypi.org/project/wcwidth/ Source0: %{pkgname}-%{version}.tar.gz BuildArch: noarch Group: Development/Libraries Prefix: %{_prefix} BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} %description This API is mainly for Terminal Emulator implementors, or those writing programs that expect to interpreted by a terminal emulator and wish to determine the printable width of a string on a Terminal. %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 ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE.txt README.rst PKG-INFO %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Wed Jan 11 2023 Ranjit Ranjan - 0.1.7-2 - wcwidth build for python3.9 * Wed Nov 6 2019 Baanu Tumma - 0.1.7-1 - First version built with python3