Blob Blame History Raw
%global modname parallel-ssh
%global _docdir_fmt %{name}

Name:           python-%{modname}
Version:        0.91.2
Release:        8%{?dist}
Summary:        Asynchronous parallel SSH library

License:        LGPLv2
URL:            https://parallel-ssh.readthedocs.io/
Source0:        https://github.com/pkittenis/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz

BuildArch:      noarch

%global _description \
Library for running asynchronous parallel SSH commands over many hosts.\
\
parallel-ssh uses asychronous network requests - there is no multi-threading or\
multi-processing used.\
\
This is a requirement for commands on many (hundreds/thousands/hundreds of\
thousands) of hosts which would grind a system to a halt simply by having so\
many processes/threads all wanting to execute if done with\
multi-threading/processing.

%description %{_description}

%package -n python2-%{modname}
Summary:        %{summary}
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
# Test deps
BuildRequires:  python2-nose
BuildRequires:  python2-gevent
BuildRequires:  python2-paramiko
Requires:       python2-gevent
Requires:       python2-paramiko
%{?python_provide:%python_provide python2-%{modname}}

%description -n python2-%{modname} %{_description}

Python 2 version.

%package -n python3-%{modname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
# embedded_server and tests are not covered by use_2to3=True
BuildRequires:  /usr/bin/2to3
# Test deps
BuildRequires:  python3-nose
BuildRequires:  python3-gevent
BuildRequires:  python3-paramiko
Requires:       python3-gevent
Requires:       python3-paramiko
%{?python_provide:%python_provide python3-%{modname}}

%description -n python3-%{modname} %{_description}

Python 3 version.

%prep
%autosetup -c
mv %{modname}-%{version}/ python2/
cp -ai python2 python3
2to3 -w -n python3/{embedded_server,tests}/

%build
pushd python2
  %py2_build
popd
pushd python3
  %py3_build
popd

%install
pushd python2
  %py2_install
popd
pushd python3
  %py3_install
popd

%check
pushd python2/tests/
  PYTHONPATH=%{buildroot}%{python2_sitelib}:`pwd`/../ nosetests-%{python2_version} -v
popd
pushd python3/tests/
  PYTHONPATH=%{buildroot}%{python3_sitelib}:`pwd`/../ nosetests-%{python3_version} -v
popd

%files -n python2-%{modname}
%license python2/COPYING
%doc python2/README.rst
%{python2_sitelib}/pssh/
%{python2_sitelib}/parallel_ssh-*.egg-info/

%files -n python3-%{modname}
%license python3/COPYING
%doc python3/README.rst
%{python3_sitelib}/pssh/
%{python3_sitelib}/parallel_ssh-*.egg-info/

%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.91.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.91.2-7
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.91.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.91.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.91.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.91.2-3
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.91.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Jul 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.91.2-1
- Update to 0.91.2

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.80.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.80.3-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Sun Oct 25 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.80.3-1
- Update to 0.80.3

* Sun Oct 11 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.80.1-1
- Initial package