python-netmiko/python-netmiko.spec

81 lines
2.2 KiB
RPMSpec
Raw Normal View History

2021-03-13 06:52:25 +00:00
%global srcname netmiko
%global sum Multi-vendor library to simplify Paramiko SSH connections to network devices
Name: python-%{srcname}
2022-11-07 13:53:08 +00:00
Version: 4.1.1
2022-06-20 14:14:33 +08:00
Release: 1
2021-03-13 06:52:25 +00:00
Summary: %{sum}
2022-11-07 13:53:08 +00:00
License: MIT and ASL 2.0
URL: https://pypi.org/project/%{srcname}
Source0: https://files.pythonhosted.org/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz
2021-03-13 06:52:25 +00:00
BuildArch: noarch
%description
%{sum}
%package -n python3-%{srcname}
Summary: %{sum}
BuildRequires: python3-devel
Requires: python3-paramiko >= 2.6.0
Requires: python3-scp >= 0.13.2
Requires: python3-pyserial
Requires: python3-tenacity
Requires: python3-textfsm
# For import test, keep the same as requirements
BuildRequires: python3-paramiko
BuildRequires: python3-scp
BuildRequires: python3-pyserial
BuildRequires: python3-tenacity
BuildRequires: python3-textfsm
BuildRequires: python3-setuptools
2022-11-07 13:53:08 +00:00
%if 0%{?rhel}
BuildRequires: python3-importlib-resources
%endif
2021-03-13 06:52:25 +00:00
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
%{sum} - package for Python 3.
# FIXME: build the documentation, when upstream starts shipping its sources:
# https://github.com/ktbyers/netmiko/issues/507
%prep
%autosetup -n %{srcname}-%{version}
# NOTE(dtantsur): ntc-templates is not packaged, we're using python3-textfsm
# instead. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1927400.
sed -i '/ntc-templates/d' setup.py
%build
%py3_build
%install
%py3_install
%check
# FIXME: run unit tests, when/if upstream creates them:
# https://github.com/ktbyers/netmiko/issues/509
%{__python3} -c "from netmiko import ConnectHandler"
%files -n python3-%{srcname}
2022-11-07 13:53:08 +00:00
%{_bindir}/netmiko-cfg
%{_bindir}/netmiko-grep
%{_bindir}/netmiko-show
2021-03-13 06:52:25 +00:00
%license LICENSE
%doc README.md
%{python3_sitelib}/*
%changelog
2022-11-07 13:53:08 +00:00
* Mon Nov 7 2022 hkgy <kaguyahatu@outlook.com> - 4.1.1-1
- Upgrade to v4.1.1
* Thu Jun 16 2022 OpenStack_SIG <openstack@openeuler.org> - 3.4.0-1
2022-06-20 14:14:33 +08:00
- Upgrade version for openstack yoga
2021-03-15 08:13:57 +00:00
* Mon Mar 15 2021 zhaorenhai <zhaorenhai@hotmail.com> - 3.3.3-2
- Change url and license
2021-03-13 06:52:25 +00:00
* Sat Mar 13 2021 zhaorenhai <zhaorenhai@hotmail.com> - 3.3.3-1
- Init package and spec, referenced from Fedora.