diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f89c826 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/paramiko-2.1.1.tar.gz diff --git a/.python-paramiko.metadata b/.python-paramiko.metadata index f8efaac..be221db 100644 --- a/.python-paramiko.metadata +++ b/.python-paramiko.metadata @@ -1 +1 @@ -12c672d1280fec02d7160afe42dd44c2e9868555ff8e1a028f10cf141ec2455f SOURCES/paramiko-1.12.4.tar.gz +0418c2fb8d2b8d1f4b86ac954ec31d5ba77d9956 SOURCES/paramiko-2.1.1.tar.gz diff --git a/SPECS/python-paramiko.spec b/SPECS/python-paramiko.spec index aeba21a..2b8a1ef 100644 --- a/SPECS/python-paramiko.spec +++ b/SPECS/python-paramiko.spec @@ -1,56 +1,170 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - %global srcname paramiko -Name: python-paramiko -Version: 1.12.4 -Release: 1%{?dist} -Summary: SSH2 protocol library for python +%if 0%{?rhel} && 0%{?rhel} <= 7 +%bcond_with weak_deps +%bcond_with python3 +%else +%bcond_without weak_deps +%bcond_without python3 +%endif + +Name: python-%{srcname} +Version: 2.1.1 +Release: 2%{?dist} +Provides: python2-paramiko = %{version}-%{release} +Summary: SSH2 protocol library for python -Group: Development/Libraries # No version specified. -License: LGPLv2+ -URL: https://github.com/paramiko/paramiko/ -Source0: http://pypi.python.org/packages/source/p/paramiko/paramiko-%{version}.tar.gz +License: LGPLv2+ +URL: https://github.com/paramiko/paramiko +Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz -BuildArch: noarch +BuildArch: noarch +Requires: python-cryptography +BuildRequires: python2-devel BuildRequires: python-setuptools -BuildRequires: python-crypto >= 2.1 -BuildRequires: python-ecdsa -Requires: python-crypto >= 2.1 -Requires: python-ecdsa +BuildRequires: python-cryptography +%global paramiko_desc \ +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.)\ %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.) +%{paramiko_desc} + +%if %{with weak_deps} +Recommends: python-gssapi +%endif + +%if %{with python3} +%package -n python%{python3_pkgversion}-%{srcname} +Summary: SSH2 protocol library for python +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-cryptography +Requires: python%{python3_pkgversion}-cryptography +%if %{with weak_deps} +Recommends: python%{python3_pkgversion}-gssapi +%endif + +%description -n python%{python3_pkgversion}-%{srcname} +%{paramiko_desc} + +Python 3 version. +%endif + +%package doc +Summary: Docs and demo for SSH2 protocol library for python +BuildRequires: /usr/bin/sphinx-build +BuildRequires: python-sphinx-theme-alabaster +Requires: %{name} = %{version}-%{release} + +%description doc +%{paramiko_desc} + +This is the documentation and demos. %prep -%setup -q -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} -%{__chmod} a-x demos/* -%{__sed} -i -e '/^#!/,1d' demos/* +chmod a-x demos/* +sed -i -e '/^#!/,1d' demos/* %build -%{__python} setup.py build +CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} build --executable="%{__python2} -s" +%if %{with python3} +%py3_build +%endif %install -%{__python} setup.py install --skip-build --root %{buildroot} +CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot} +%if %{with python3} +%py3_install +%endif -%check -python ./test.py +sphinx-build -b html sites/docs/ html/ +rm -f html/.buildinfo -%files -%doc LICENSE PKG-INFO README docs/ demos/ -%{python_sitelib}/* +%check +%{__python2} ./test.py --no-sftp --no-big-file +%if %{with python3} +%{__python3} ./test.py --no-sftp --no-big-file +%endif + +%files -n python-%{srcname} +%license LICENSE +%doc NEWS README.rst +%{python2_sitelib}/%{srcname}-*.egg-info/ +%{python2_sitelib}/%{srcname}/ + +%if %{with python3} +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc NEWS README.rst +%{python3_sitelib}/%{srcname}-*.egg-info/ +%{python3_sitelib}/%{srcname}/ +%endif + +%files doc +%doc html/ demos/ %changelog +* Fri May 12 2017 Pavel Cahyna - 2.1.1-2 +- Rebuild for RHEL 7.4 Extras + +* Thu Jan 05 2017 Troy Dawson 2.1.1-1 +- Update to 2.1.1 + +* Fri Jul 08 2016 Jon Schlueter 2.0.0-1.0 +- Rebuild + +* Fri Apr 29 2016 Igor Gnatenko - 2.0.0-1 +- Update to 2.0.0 (RHBZ #1331737) + +* Sun Mar 27 2016 Igor Gnatenko - 1.16.0-1 +- Update to 1.16.0 +- Adopt to new packaging guidelines + +* Thu Feb 04 2016 Fedora Release Engineering - 1.15.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 10 2015 Fedora Release Engineering - 1.15.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.15.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Mar 22 2015 Peter Robinson 1.15.2-2 +- Use %%license +- Move duplicated docs to single doc sub package +- Remove old F-15 conditionals + +* Tue Dec 23 2014 Athmane Madjoudj 1.15.2-1 +- Update to 1.15.2 + +* Mon Nov 24 2014 Athmane Madjoudj 1.15.1-5 +- Add conditional to exclude EL since does not have py3 + +* Sat Nov 15 2014 Athmane Madjoudj 1.15.1-4 +- py3dir creation should be in prep section + +* Fri Nov 14 2014 Athmane Madjoudj 1.15.1-3 +- Build each pkg in a clean dir + +* Fri Nov 14 2014 Athmane Madjoudj 1.15.1-2 +- Add support for python3 +- Add BR -devel for python macros. + +* Fri Oct 17 2014 Jeffrey C. Ollie - 1.15.1-1 +- Update to 1.15.1 + * Fri Jun 13 2014 Orion Poplawski - 1.12.4-1 - Update to 1.12.4