Blame python-netmiko.spec

956a8cc
%if 0%{?fedora}
956a8cc
%global with_python3 1
956a8cc
%endif
956a8cc
956a8cc
%global srcname netmiko
956a8cc
%global sum Multi-vendor library to simplify Paramiko SSH connections to network devices
956a8cc
956a8cc
Name:           python-%{srcname}
Alan Pevec 4776cce
Version:        2.1.0
Alan Pevec 4776cce
Release:        1%{?dist}
956a8cc
Summary:        %{sum}
956a8cc
956a8cc
License:        MIT
956a8cc
URL:            https://pypi.python.org/pypi/%{srcname}
956a8cc
Source0:        https://pypi.io/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz
956a8cc
956a8cc
BuildArch:      noarch
956a8cc
956a8cc
%description
956a8cc
%{sum}
956a8cc
956a8cc
956a8cc
%package -n python2-%{srcname}
956a8cc
Summary:        %{sum}
956a8cc
BuildRequires:  python2-devel
Alan Pevec 4776cce
Requires:       python2-paramiko >= 2.0.0
956a8cc
Requires:       python2-scp >= 0.10.0
956a8cc
Requires:       PyYAML
Alan Pevec 4776cce
Requires:       python2-pyserial
Alan Pevec 4776cce
Requires:       python2-textfsm
Alan Pevec 4776cce
956a8cc
%{?python_provide:%python_provide python2-%{srcname}}
956a8cc
956a8cc
%description -n python2-%{srcname}
956a8cc
%{sum} - package for Python 2.
956a8cc
956a8cc
956a8cc
%if 0%{?with_python3}
956a8cc
956a8cc
%package -n python3-%{srcname}
956a8cc
Summary:        %{sum}
956a8cc
BuildRequires:  python3-devel
Alan Pevec 4776cce
Requires:       python3-paramiko >= 2.0.0
956a8cc
Requires:       python3-scp >= 0.10.0
956a8cc
Requires:       python3-PyYAML
Alan Pevec 4776cce
Requires:       python3-pyserial
Alan Pevec 4776cce
Requires:       python3-textfsm
956a8cc
%{?python_provide:%python_provide python3-%{srcname}}
956a8cc
956a8cc
%description -n python3-%{srcname}
956a8cc
%{sum} - package for Python 3.
956a8cc
956a8cc
%endif
956a8cc
956a8cc
# FIXME: build the documentation, when upstream starts shipping its sources:
956a8cc
# https://github.com/ktbyers/netmiko/issues/507
956a8cc
956a8cc
956a8cc
%prep
956a8cc
%autosetup -n %{srcname}-%{version}
956a8cc
956a8cc
%build
956a8cc
%py2_build
956a8cc
956a8cc
%if 0%{?with_python3}
956a8cc
%py3_build
956a8cc
%endif
956a8cc
956a8cc
%install
956a8cc
%py2_install
956a8cc
956a8cc
%if 0%{?with_python3}
956a8cc
%py3_install
956a8cc
%endif
956a8cc
956a8cc
%check
956a8cc
# FIXME: run unit tests, when upstream starts shipping them:
956a8cc
# https://github.com/ktbyers/netmiko/issues/508
956a8cc
956a8cc
956a8cc
%files -n python2-%{srcname}
956a8cc
%license LICENSE
956a8cc
%doc README.md
956a8cc
%{python2_sitelib}/*
956a8cc
956a8cc
%if 0%{?with_python3}
956a8cc
956a8cc
%files -n python3-%{srcname}
956a8cc
%license LICENSE
956a8cc
%doc README.md
956a8cc
%{python3_sitelib}/*
956a8cc
956a8cc
%endif
956a8cc
956a8cc
956a8cc
%changelog
Alan Pevec 4776cce
* Fri Mar 16 2018 Alan Pevec <alan.pevec@redhat.com> 2.1.0-1
Alan Pevec 4776cce
- Update to 2.1.0 (rhbz#1532228)
Alan Pevec 4776cce
9e2bf1a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
9e2bf1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9e2bf1a
ca43d53
* Thu Jan 4 2018 Dmitry Tantsur <divius.inside@gmail.com> - 1.4.3-1
ca43d53
- Update to 1.4.3
ca43d53
b688644
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-2
b688644
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b688644
9e379f3
* Mon Jul 24 2017 Dmitry Tantsur <divius.inside@gmail.com> - 1.4.2-1
9e379f3
- Update to 1.4.2
9e379f3
956a8cc
* Mon Jul 24 2017 Dmitry Tantsur <divius.inside@gmail.com> - 1.4.1-1
956a8cc
- Initial packaging (#1465006)