[packages/python3-paramiko] - python-paramiko.spec updated to 4.0.0 for python 3.9+
qboosh
qboosh at pld-linux.org
Fri Apr 17 06:21:48 CEST 2026
commit b66c3a13d1c10e6b1053f41fcda93d5e2837573f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Apr 17 06:22:21 2026 +0200
- python-paramiko.spec updated to 4.0.0 for python 3.9+
paramiko-mock.patch | 95 ---------------------------
python-paramiko.spec | 173 --------------------------------------------------
python3-paramiko.spec | 105 ++++++++++++++++++++++++++++++
3 files changed, 105 insertions(+), 268 deletions(-)
---
diff --git a/python-paramiko.spec b/python-paramiko.spec
deleted file mode 100644
index be8858a..0000000
--- a/python-paramiko.spec
+++ /dev/null
@@ -1,173 +0,0 @@
-#
-# Conditional build:
-%bcond_without doc # API documentation
-%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-%define module paramiko
-Summary: SSH2 protocol for Python 2
-Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie 2
-Name: python-%{module}
-# keep 2.x here for python2 support
-Version: 2.12.0
-Release: 3
-License: LGPL v2.1+
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/paramiko/
-Source0: https://github.com/paramiko/paramiko/archive/%{version}/%{module}-%{version}.tar.gz
-# Source0-md5: 9fed2b771bf8afa91b74a5536de3c670
-Patch0: paramiko-mock.patch
-URL: https://github.com/paramiko/paramiko/
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-PyNaCl >= 1.0.1
-BuildRequires: python-bcrypt >= 3.1.3
-BuildRequires: python-cryptography >= 2.5
-BuildRequires: python-mock
-BuildRequires: python-pyasn1 >= 0.1.7
-BuildRequires: python-pytest >= 4.4.2
-BuildRequires: python-pytest-relaxed
-BuildRequires: python-six
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.4
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-PyNaCl >= 1.0.1
-BuildRequires: python3-bcrypt >= 3.1.3
-BuildRequires: python3-cryptography >= 2.5
-BuildRequires: python3-pyasn1 >= 0.1.7
-BuildRequires: python3-pytest >= 4.4.2
-BuildRequires: python3-pytest-relaxed
-BuildRequires: python3-six
-%endif
-%endif
-%if %{with doc}
-BuildRequires: python3-alabaster >= 0.7.12
-BuildRequires: sphinx-pdg-3 >= 1.4
-%endif
-Requires: python-modules >= 1:2.7
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A module for Python 2.6 (or higher) that implements the SSH2 protocol
-for secure (encrypted and authenticated) connections to remote
-machines.
-
-%description -l pl.UTF-8
-Moduł dla języka Python 2.6 (lub wyższego) implementujący protokół
-SSH2 dla uzyskania bezpiecznych (szyfrowanych i autoryzowanych)
-połączeń ze zdalnymi maszynami.
-
-%package -n python3-%{module}
-Summary: SSH2 protocol for Python 3
-Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie 3
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-%{module}
-A module for Python 3.2 (or higher) that implements the SSH2 protocol
-for secure (encrypted and authenticated) connections to remote
-machines.
-
-%description -n python3-%{module} -l pl.UTF-8
-Moduł dla języka Python 3.2 (lub wyższego) implementujący protokół
-SSH2 dla uzyskania bezpiecznych (szyfrowanych i autoryzowanych)
-połączeń ze zdalnymi maszynami.
-
-%package apidocs
-Summary: API documentation for paramiko module
-Summary(pl.UTF-8): Dokumentacja API modułu paramiko
-Group: Documentation
-
-%description apidocs
-API documentation for paramiko module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu paramiko.
-
-%prep
-%setup -q -n %{module}-%{version}
-%patch -P 0 -p1
-
-# Windows-specific modules, break tests by using Windows-specific ctypes API
-%{__rm} paramiko/{win_pageant,_winapi}.py
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-# note: slow tests are broken
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests -m 'not slow'
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests -m 'not slow'
-%endif
-%endif
-
-%if %{with doc}
-sphinx-build-3 -b html sites/docs sites/docs/_build/html
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
-cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
-%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc NEWS NOTES README.rst TODO sites/www/changelog.rst
-%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%{_examplesdir}/%{name}-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc NEWS NOTES README.rst TODO sites/www/changelog.rst
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%{_examplesdir}/python3-%{module}-%{version}
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc sites/docs/_build/html/{_static,api,*.html,*.js}
-%endif
diff --git a/python3-paramiko.spec b/python3-paramiko.spec
new file mode 100644
index 0000000..1da1cae
--- /dev/null
+++ b/python3-paramiko.spec
@@ -0,0 +1,105 @@
+#
+# Conditional build:
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
+
+%define module paramiko
+Summary: SSH2 protocol for Python 3
+Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie 3
+Name: python3-%{module}
+Version: 4.0.0
+Release: 1
+License: LGPL v2.1+
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/paramiko/
+Source0: https://github.com/paramiko/paramiko/archive/%{version}/%{module}-%{version}.tar.gz
+# Source0-md5: e5722ec7a749c0449824af27961b62f9
+URL: https://github.com/paramiko/paramiko/
+BuildRequires: python3-build
+BuildRequires: python3-devel >= 1:3.9
+BuildRequires: python3-installer
+BuildRequires: python3-setuptools >= 1:77
+%if %{with tests}
+BuildRequires: python3-PyNaCl >= 1.5
+BuildRequires: python3-bcrypt >= 3.2
+BuildRequires: python3-cryptography >= 3.3
+# optional
+#BuildRequires: python3-gssapi >= 1.4.1
+BuildRequires: python3-invoke >= 2.0
+BuildRequires: python3-pyasn1 >= 0.1.7
+BuildRequires: python3-pytest >= 4.4.2
+BuildRequires: python3-pytest-relaxed >= 2
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires: python3-alabaster >= 0.7.13
+BuildRequires: python3-releases >= 2.1
+BuildRequires: sphinx-pdg-3 >= 1.4
+%endif
+Requires: python3-modules >= 1:3.9
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A module for Python that implements the SSH2 protocol for secure
+(encrypted and authenticated) connections to remote machines.
+
+%description -l pl.UTF-8
+Moduł dla języka Python implementujący protokół SSH2 w celu uzyskania
+bezpiecznych (szyfrowanych i autoryzowanych) połączeń ze zdalnymi
+maszynami.
+
+%package apidocs
+Summary: API documentation for paramiko module
+Summary(pl.UTF-8): Dokumentacja API modułu paramiko
+Group: Documentation
+
+%description apidocs
+API documentation for paramiko module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu paramiko.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+# Windows-specific modules, break tests by using Windows-specific ctypes API
+%{__rm} paramiko/{win_pageant,_winapi}.py
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests -m 'not slow'
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html sites/docs sites/docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst SECURITY.md TODO sites/www/changelog.rst
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}.dist-info
+%{_examplesdir}/python3-%{module}-%{version}
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc sites/docs/_build/html/{_static,api,*.html,*.js}
+%endif
diff --git a/paramiko-mock.patch b/paramiko-mock.patch
deleted file mode 100644
index 943dcfb..0000000
--- a/paramiko-mock.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- paramiko-2.12.0/tests/test_channelfile.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_channelfile.py 2023-10-27 16:44:41.043917943 +0200
-@@ -1,4 +1,7 @@
--from mock import patch, MagicMock
-+try:
-+ from unittest.mock import patch, MagicMock
-+except ImportError:
-+ from mock import patch, MagicMock
-
- from paramiko import Channel, ChannelFile, ChannelStderrFile, ChannelStdinFile
-
---- paramiko-2.12.0/tests/test_client.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_client.py 2023-10-27 16:45:19.653708776 +0200
-@@ -35,7 +35,10 @@ from tempfile import mkstemp
-
- import pytest
- from pytest_relaxed import raises
--from mock import patch, Mock
-+try:
-+ from unittest.mock import patch, Mock
-+except ImportError:
-+ from mock import patch, Mock
-
- import paramiko
- from paramiko import SSHClient
---- paramiko-2.12.0/tests/test_config.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_config.py 2023-10-27 16:45:46.530229840 +0200
-@@ -11,7 +11,10 @@ try:
- except ImportError:
- Result = None
-
--from mock import patch
-+try:
-+ from unittest.mock import patch
-+except ImportError:
-+ from mock import patch
- from pytest import raises, mark, fixture
-
- from paramiko import (
---- paramiko-2.12.0/tests/test_kex.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_kex.py 2023-10-27 16:47:26.926352615 +0200
-@@ -24,7 +24,10 @@ from binascii import hexlify, unhexlify
- import os
- import unittest
-
--from mock import Mock, patch
-+try:
-+ from unittest.mock import Mock, patch
-+except ImportError:
-+ from mock import Mock, patch
- import pytest
-
- from cryptography.hazmat.backends import default_backend
---- paramiko-2.12.0/tests/test_pkey.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_pkey.py 2023-10-27 16:47:52.792879150 +0200
-@@ -41,7 +41,10 @@ from paramiko.common import o600
-
- from cryptography.exceptions import UnsupportedAlgorithm
- from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateNumbers
--from mock import patch, Mock
-+try:
-+ from unittest.mock import patch, Mock
-+except ImportError:
-+ from mock import patch, Mock
- import pytest
-
- from .util import _support, is_low_entropy, requires_sha1_signing
---- paramiko-2.12.0/tests/test_proxy.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_proxy.py 2023-10-27 16:48:22.616050918 +0200
-@@ -1,7 +1,10 @@
- import signal
- import socket
-
--from mock import patch
-+try:
-+ from unittest.mock import patch
-+except ImportError:
-+ from mock import patch
- from pytest import raises
-
- from paramiko import ProxyCommand, ProxyCommandFailure
---- paramiko-2.12.0/tests/test_transport.py.orig 2022-11-04 23:32:40.000000000 +0100
-+++ paramiko-2.12.0/tests/test_transport.py 2023-10-27 16:48:44.662598148 +0200
-@@ -30,7 +30,10 @@ import time
- import threading
- import random
- import unittest
--from mock import Mock
-+try:
-+ from unittest.mock import Mock
-+except ImportError:
-+ from mock import Mock
-
- from paramiko import (
- AuthHandler,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-paramiko.git/commitdiff/b66c3a13d1c10e6b1053f41fcda93d5e2837573f
More information about the pld-cvs-commit
mailing list