[packages/python-paramiko] - fixed tests, release 1
qboosh
qboosh at pld-linux.org
Fri Mar 18 18:36:15 CET 2016
commit 8a9038f2f707a8308384e57b252eb687d87198ae
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Mar 18 18:36:34 2016 +0100
- fixed tests, release 1
python-paramiko.spec | 85 ++++++++++++++++++++++++++--------------------------
1 file changed, 43 insertions(+), 42 deletions(-)
---
diff --git a/python-paramiko.spec b/python-paramiko.spec
index 0d731cc..b3b44d4 100644
--- a/python-paramiko.spec
+++ b/python-paramiko.spec
@@ -1,92 +1,96 @@
-# TODO:
-# Fix tests:
-# class VARIANT_BOOL(ctypes._SimpleCData):
-# ValueError: _type_ 'v' not supported
-
#
# Conditional build:
-%bcond_without apidocs # do not build and package API docs
-%bcond_with tests # do not perform "make test"
+%bcond_without apidocs # API docs packaging
+%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
-Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie
+Summary: SSH2 protocol for Python 2
+Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie 2
Name: python-%{module}
Version: 1.16.0
-Release: 0.1
-License: LGPL
+Release: 1
+License: LGPL v2.1+
Group: Libraries/Python
-Source0: http://pypi.python.org/packages/source/p/paramiko/paramiko-%{version}.tar.gz
+#Source0Download: https://pypi.python.org/simple/paramiko/
+Source0: https://pypi.python.org/packages/source/p/paramiko/paramiko-%{version}.tar.gz
# Source0-md5: 7e1203f5ffeb7d2bc2bffc4feb804216
URL: https://github.com/paramiko/paramiko/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.710
%if %{with python2}
-BuildRequires: python-Crypto >= 1.9
-BuildRequires: python-devel >= 2.3
-BuildRequires: python-ecdsa >=0.11
+BuildRequires: python-Crypto >= 2.1
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-ecdsa >= 0.11
%endif
%if %{with python3}
-BuildRequires: python3-Crypto >= 1.9
-BuildRequires: python3-devel
-BuildRequires: python3-ecdsa >=0.11
+BuildRequires: python3-Crypto >= 2.1
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-ecdsa >= 0.11
%endif
-
-
-Requires: python-Crypto
-Requires: python-modules
+Requires: python-Crypto >= 2.1
+Requires: python-ecdsa >= 0.11
+Requires: python-modules >= 1:2.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-A module for Python 2.3 (or higher) that implements the SSH2 protocol
+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.3 (lub wyższego) implementujący protokół
+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
-Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie
+Summary: SSH2 protocol for Python 3
+Summary(pl.UTF-8): Obsługa protokołu SSH2 w Pythonie 3
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-Crypto >= 2.1
+Requires: python3-ecdsa >= 0.11
+Requires: python3-modules >= 1:3.2
%description -n python3-%{module}
-A module for Python 3 (or higher) that implements the SSH2 protocol
+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 (lub wyższego) implementujący protokół SSH2
-dla uzyskania bezpiecznych (szyfrowanych i autoryzowanych) połączeń ze
-zdalnymi maszynami.
+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: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
+Summary: API documentation for paramiko module
+Summary(pl.UTF-8): Dokumentacja API modułu paramiko
Group: Documentation
%description apidocs
-API and internal documentation for paramiko library.
+API documentation for paramiko module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu paramiko.
%prep
-%setup -q -n %{module}-%{version}
+%setup -q -n %{module}-%{version}
find demos -name '*.py' -type f | xargs sed -i -e '1s|#!.*python.*|#!%{_bindir}/python|'
+# Windows-specific modules, break tests by using Windows-specific ctypes API
+%{__rm} paramiko/{win_pageant,_winapi}.py
+
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+%{?with_tests:LC_ALL=C.UTF-8 %{__python} test.py}
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+%{?with_tests:LC_ALL=C.UTF-8 %{__python3} test.py}
%endif
%install
@@ -121,9 +125,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README
%{py_sitescriptdir}/%{module}
-%if "%{py_ver}" > "2.4"
%{py_sitescriptdir}/%{module}-*.egg-info
-%endif
%{_examplesdir}/%{name}-%{version}
%endif
@@ -136,9 +138,8 @@ rm -rf $RPM_BUILD_ROOT
%{_examplesdir}/python3-%{module}-%{version}
%endif
-
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/*
+%doc docs/{_static,api,*.html,*.js}
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-paramiko.git/commitdiff/8a9038f2f707a8308384e57b252eb687d87198ae
More information about the pld-cvs-commit
mailing list