%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 pynacl %global src_name PyNaCl %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 1.3.0 Release: 2 Summary: Python binding to the Networking and Cryptography (NaCl) library License: BSD URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/p/%{pkgname}/%{src_name}-%{version}.tar.gz BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: %{python_major}-cffi >= 1.13.2 Requires: %{python_major}-six >= 1.12.0 Requires: libsodium >= 1.0.18 %description PyNaCl is a Python binding to the Networking and Cryptography library,\ a crypto library with the stated goal of improving usability, security\ and speed. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} Requires: python3-cffi >= 1.13.2 Requires: python3-six >= 1.12.0 Requires: libsodium >= 1.0.18 %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{src_name}-%{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.rst LICENSE PKG-INFO README.rst %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Mon Mar 13 2023 Raghu N Arava - 1.3.0-2 - Build with python3.9 and updated to version 1.3.0-2