From 409e6069a1fabecb77c23b5af9baed1041bc06bf95d11860378d397df78548ed Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 19 Apr 2017 17:40:20 +0000 Subject: [PATCH] Accepting request 489398 from home:TheBlackCat:branches:devel:languages:python Implement single-spec version. OBS-URL: https://build.opensuse.org/request/show/489398 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-paramiko?expand=0&rev=60 --- python-paramiko.changes | 5 +++++ python-paramiko.spec | 34 +++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/python-paramiko.changes b/python-paramiko.changes index ac22e48..d0989e1 100644 --- a/python-paramiko.changes +++ b/python-paramiko.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 19 17:24:58 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. + ------------------------------------------------------------------- Fri Mar 17 20:25:35 UTC 2017 - rjschwei@suse.com diff --git a/python-paramiko.spec b/python-paramiko.spec index 877c46c..9517abd 100644 --- a/python-paramiko.spec +++ b/python-paramiko.spec @@ -16,6 +16,9 @@ # +%bcond_without test + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-paramiko Version: 2.1.2 Release: 0 @@ -23,15 +26,18 @@ Url: http://www.paramiko.org/ Summary: SSH2 protocol library License: LGPL-2.1+ Group: Development/Languages/Python -Source: https://pypi.io/packages/source/p/paramiko/paramiko-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/p/paramiko/paramiko-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-cryptography >= 1.1 -BuildRequires: python-devel -BuildRequires: python-pyasn1 >= 0.1.7 -BuildRequires: python-setuptools +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module cryptography >= 1.1} +BuildRequires: %{python_module pyasn1 >= 0.1.7} Requires: python-cryptography >= 1.1 Requires: python-pyasn1 >= 0.1.7 BuildArch: noarch +%python_subpackages %description This is a library for making SSH2 connections (client or server). @@ -43,20 +49,22 @@ are supported. SFTP client and server mode are both supported too. %setup -q -n paramiko-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with test} %check -# The --no-transport fixes a known issue with the tests -# https://github.com/paramiko/paramiko/issues/574 -# Check if still failing on next release -LANG=en_US.UTF-8 python test.py --no-transport +export LANG=en_US.UTF-8 +%python_exec test.py +%endif -%files +%files %{python_files} %defattr(-,root,root) -%doc LICENSE README.rst demos +%doc LICENSE README.rst +%doc demos/ %{python_sitelib}/* %changelog