%{!?dotests: %define dotests 1} %define name python3-pynacl %define srcname PyNaCl %define version 1.3.0 %define release 1 %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /opt/freeware/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: Python binding to the Networking and Cryptography (NaCl) library Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: Apache Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: ppc Url: https://pypi.org/ Requires: python3-cffi >= 1.13.2 Requires: python3-six >= 1.12.0 Requires: python3 >= 3.7.3 Requires: libsodium >= 1.0.18 BuildRequires: python3-pycparser >= 2.19 BuildRequires: libsodium-devel >= 1.0.18 BuildRequires: python3-pytest >= 5.3.1, python3-py >= 1.8.0, python3-pluggy >= 0.13.0 %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. %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %check if [ "%{dotests}" == 1 ] then (PYTHONPATH=%{buildroot}%{python_sitelib64} py.test-3 -v || true) fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGELOG.rst LICENSE PKG-INFO README.rst %{python_sitelib64}/* %changelog *Wed Aug 21 2019 Baanu Tumma - 1.3.0-1 - First version for AIX, built using python3