%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_minor 16 %global py_major 3.9 %global python_major python%{py_major} %global pkgname pyspnego %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 0.3.1 Release: 2 Summary: Windows Negotiate Authentication Client and Server License: MIT URL: https://github.com/jborean93/pyspnego Source0: https://files.pythonhosted.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: python3.9-cryptography >= 3.4.7-2 %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". %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 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} #renaming the files in bindir to avoid conflict with python-pyspnego cd ${RPM_BUILD_ROOT}/%{_bindir} for file in *; do mv $file $file-3.9 ln -sf $file-3.9 $file done %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,-) %license LICENSE %doc README.md CHANGELOG.md %{python3_sitearch}/* %{_bindir}/* %exclude %{_bindir}/pyspnego-parse %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/* %exclude %{_bindir}/*3.9 %changelog * Thu Mar 09 2023 Sangeetha Bandi - 0.3.1-2 - pyspnego for python3.9 * Thu Jan 27 2022 Reshma V Kumar - 0.3.1 - Initial port for AIX Toolbox