%define name python3-bcrypt %define srcname bcrypt %define version 3.1.7 %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: File encryption utility Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: BSD Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: ppc Url: https://pypi.org/ Requires: python3 >= 3.7.3 Requires: python3-cffi >= 1.13.2 Requires: python3-six >= 1.12.0 BuildRequires: python3-pytest >= 5.3.1, python3-py >= 1.8.0, python3-pluggy >= 0.13.0 %description Bcrypt is a cross platform file encryption utility. Encrypted files are portable across all supported operating systems and processors. Passphrases must be between 8 and 56 characters and are hashed internally to a 448 bit key. However, all characters supplied are significant. The stronger your passphrase, the more secure your data. %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build python3 setup.py test %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{python_sitelib64}/bcrypt %{python_sitelib64}/bcrypt-%{version}-py?.?.egg-info %changelog *Wed Aug 28 2019 Baanu Tumma - 2.19-1 - First version for AIX, built using python3