%{!?dotests: %define dotests 1} %define is_python %(test -e /usr/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 /usr/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 %define real_name paramiko Name: python3-paramiko Version: 2.6.0 Release: 1 Summary: A SSH2 protocol library for python Group: Development/Libraries # No version specified. License: LGPLv2+ URL: https://pypi.org/project/paramiko/ Source0: %{real_name}-%{version}.tar.gz BuildArch: noarch Requires: python3-bcrypt >= 3.1.7 Requires: python3-cryptography >= 2.8 Requires: python3-pynacl >= 1.3.0 BuildRequires: patch, sed BuildRequires: python3-devel >= 2.7.15 BuildRequires: python3-pytest >= 5.3.1, python3-py >= 1.8.0, python3-pluggy >= 0.13.0 # we need /dev/urandom Requires: python3 >= 3.7.3 %description Paramiko (a combination of the esperanto words for "paranoid" and "friend") is a module for python 2.3 or greater that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. Unlike SSL (aka TLS), the SSH2 protocol does not require heirarchical certificates signed by a powerful central authority. You may know SSH2 as the protocol that replaced telnet and rsh for secure access to remote shells, but the protocol also includes the ability to open arbitrary channels to remote services across an encrypted tunnel. (This is how sftp works, for example.) %prep %setup -q -n %{real_name}-%{version} export PATH=/opt/freeware/bin:$PATH %{__chmod} a-x demos/* sed -i -e '/^#!/,1d' demos/* %build python3 setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %check # Remove sftp test (fail under mock) rm -f tests/test_sftp*.py (PYTHONPATH=%{buildroot}%{python_sitelib} pytest-3 || true) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE PKG-INFO README.rst %{python_sitelib}/* %changelog * Tue Dec 03 2019 Baanu tumma - 2.6.0-1 - update to version 2.6.0 ( fixed CVE-2018-7750 CVE-2018-1000805 ), built using python3 * Tue Feb 08 2011 Michael Perzl - 1.7.6-1 - updated to version 1.7.6 * Wed Sep 02 2009 Michael Perzl - 1.7.5-1 - first version for AIX V5.1 and higher