%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 pyserial %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: 3.4 Release: 2 Summary: Python serial port access library License: Python URL: https://pypi.python.org/pypi/pyserial 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 module encapsulates the access for the serial port. It provides backends for standard Python running on Windows, Linux, BSD (possibly any POSIX compilant system) and Jython. The module named "serial" automaticaly selects the appropriate backend. %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 OBJECT_MODE=64 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} cd ${RPM_BUILD_ROOT}%{_bindir} mv miniterm.py miniterm-3.9.py ln -s miniterm-3.9.py miniterm.py %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{_bindir}/miniterm-3.9.py %doc LICENSE.txt CHANGES.rst README.rst examples %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/miniterm.py %changelog * Wed Feb 15 2023 Ranjit Ranjan -3.4-2 - pyserial build for python3.9 * Sun Jan 26 2020 Reshma V Kumar -3.4-1 - Update to latest version - Build with python3 * Thu Jun 16 2016 Reshma V Kumar -2.7-1 - updated to latest version * Wed May 25 2016 Ravi Hirekurabar - 2.7-1 - first version for AIX V6.1 and higher