SPECS/paramiko/paramiko.spec
ba174b20
 %{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
31f34db4
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
 Summary:        Python SSH module
 Name:           paramiko
0fc8a4ab
 Version:        2.1.5
 Release:        1%{?dist}
31f34db4
 License:        LGPL
 Group:          System Environment/Security
 Vendor:         VMware, Inc.
 Distribution:   Photon
 URL:            http://www.paramiko.org/
 Source0:        https://github.com/paramiko/paramiko/archive/paramiko-%{version}.tar.gz
0fc8a4ab
 %define         sha1 paramiko=0f1e47ec1822964aeb96974562716c834292962c
5f0e5f3f
 
31f34db4
 BuildArch:      noarch
5f0e5f3f
 
 BuildRequires:  python-setuptools
 BuildRequires:  python2-devel
 BuildRequires:  ecdsa > 0.11
31f34db4
 BuildRequires:  pycrypto > 2.1
29dd855c
 BuildRequires:  python-cryptography
5f0e5f3f
 
31f34db4
 Requires:       python2
 Requires:       pycrypto > 2.1
 Requires:       ecdsa > 0.11
29dd855c
 Requires:       python-cryptography
5f0e5f3f
 
 
 %description
 "Paramiko" is a combination of the esperanto words for "paranoid" and "friend". It's a module for Python 2.6+ that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. Unlike SSL (aka TLS), SSH2 protocol does not require hierarchical certificates signed by a powerful central authority.
 
31f34db4
 %package -n     python3-paramiko
 Summary:        python3-paramiko
 BuildRequires:  python3-devel
 BuildRequires:  python3-ecdsa > 0.11
 BuildRequires:  python3-pycrypto > 2.1
29dd855c
 BuildRequires:  python3-cryptography
a848bcf8
 BuildRequires:  python3-setuptools
 BuildRequires:  python3-xml
31f34db4
 
 Requires:       python3
 Requires:       python3-pycrypto > 2.1
 Requires:       python3-ecdsa > 0.11
29dd855c
 Requires:       python3-cryptography
31f34db4
 %description -n python3-paramiko
 
 Python 3 version.
 
5f0e5f3f
 %prep
 %setup -q
 
 %build
ba174b20
 python2 setup.py build
31f34db4
 python3 setup.py build
5f0e5f3f
 
 %install
 %{__rm} -rf %{buildroot}
ba174b20
 python2 setup.py install -O1 --skip-build \
5f0e5f3f
     --root "%{buildroot}" \
     --single-version-externally-managed
 
31f34db4
 python3 setup.py install -O1 --skip-build \
     --root "%{buildroot}" \
     --single-version-externally-managed
 
821d89bf
 %check
b5b74704
 LANG=en_US.UTF-8 python2 test.py
 LANG=en_US.UTF-8 python3 test.py
821d89bf
 
5f0e5f3f
 %clean
 %{__rm} -rf %{buildroot}
 
 %files
 %defattr(-, root, root)
 %doc *.txt
ba174b20
 %{python2_sitelib}/*
5f0e5f3f
 
31f34db4
 %files -n python3-paramiko
 %defattr(-, root, root)
 %doc *.txt
 %{python3_sitelib}/*
 
5f0e5f3f
 %changelog
0fc8a4ab
 *   Mon Apr 16 2018 Xiaolin Li <xiaolinl@vmware.com> 2.1.5-1
 -   Update version to 2.1.5 for CVE-2018-1000132
b5b74704
 *   Tue Jul 25 2017 Divya Thaluru <dthaluru@vmware.com> 2.1.2-5
 -   Fixed test command
a848bcf8
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.1.2-4
 -   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
ba174b20
 *   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.1.2-3
 -   Use python2 explicitly while building
29dd855c
 *   Fri May 05 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.1.2-2
 -   Added missing requires python-cryptography
d34c574b
 *   Sat Apr 15 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.1.2-1
 -   Update to 2.1.2
31f34db4
 *   Mon Feb 27 2017 Xiaolin Li <xiaolinl@vmware.com> 1.16.0-4
 -   Added python3 site-packages.
 *   Fri Oct 07 2016 ChangLee <changlee@vmware.com> 1.16.0-3
 -   Modified %check
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.16.0-2
 -   GA - Bump release of all rpms
 *   Tue Jan 5 2016 Xiaolin Li <xiaolinl@vmware.com> 1.16.0-1
 -   Initial build.  First version