%{!?dotests: %define dotests 1} %define name python3-requests-kerberos %define srcname requests-kerberos %define version 0.13.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 && 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 : A Kerberos authentication handler for python-requests Name : %{name} Version : %{version} Release : %{release} Source0 : %{srcname}-%{version}.tar.gz Url : https://github.com/requests/requests-kerberos License : ISC Group : Development/Libraries BuildArch: noarch BuildRequires: python3 >= 3.7.11 BuildRequires: python3-devel >= 3.7.11 #For running testcases BuildRequires: python3-pyspnego >= 0.3.1 Requires: python3 >= 3.7.11 Requires: python3-pyspnego >= 0.3.1 Requires: python3-cryptography >= 3.2.1 Requires: python3-requests >= 2.22.0 %description Requests is an HTTP library, written in Python, for human beings. This library adds optional Kerberos/GSSAPI authentication support and supports mutual authentication. %prep %setup -q -n %{srcname}-%{version} %build export OBJECT_MODE=64 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 export CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 py.test-3 tests/ || true fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE %doc README.rst AUTHORS HISTORY.rst %{python_sitelib}/* %changelog * Wed Jan 05 2022 Reshma V Kumar - 0.13.0 - Initial port for AIX Toolbox