2019-10-08 07:10:50 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-napalm
|
|
|
|
|
#
|
2023-08-23 11:04:54 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-10-08 07:10:50 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-napalm
|
2023-08-23 11:04:54 +00:00
|
|
|
Version: 4.1.0
|
2019-10-08 07:10:50 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Network Automation and Programmability Abstraction Layer
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://github.com/napalm-automation/napalm
|
|
|
|
|
Source: https://github.com/napalm-automation/napalm/archive/%{version}.tar.gz#/napalm-%{version}.tar.gz
|
2022-03-24 13:42:27 +00:00
|
|
|
# https://github.com/napalm-automation/napalm/issues/1594
|
|
|
|
|
Patch0: python-napalm-no-mock.patch
|
2023-08-23 11:04:54 +00:00
|
|
|
# https://github.com/napalm-automation/napalm/pull/1796
|
|
|
|
|
Patch1: napalm-gh-pr1796-xmlgetparent.patch
|
2023-09-06 02:58:18 +00:00
|
|
|
# https://github.com/napalm-automation/napalm/pull/2002
|
|
|
|
|
Patch2: remove-future-requirement.patch
|
|
|
|
|
BuildRequires: %{python_module pip}
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-09-06 02:58:18 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
Requires: python-Jinja2
|
|
|
|
|
Requires: python-PyYAML
|
|
|
|
|
Requires: python-cffi >= 1.11.3
|
2022-10-25 18:13:38 +00:00
|
|
|
Requires: python-junos-eznc >= 2.6.3
|
2021-10-14 14:28:31 +00:00
|
|
|
Requires: python-lxml >= 4.3.0
|
|
|
|
|
Requires: python-ncclient
|
2019-10-08 07:10:50 +00:00
|
|
|
Requires: python-netaddr
|
2022-08-05 04:59:58 +00:00
|
|
|
Requires: python-netmiko >= 4.0.0
|
2023-01-02 12:53:05 +00:00
|
|
|
Requires: python-netutils >= 1.0.0
|
2020-09-04 05:33:30 +00:00
|
|
|
Requires: python-paramiko >= 2.6.0
|
2019-10-08 07:10:50 +00:00
|
|
|
Requires: python-pyeapi >= 0.8.2
|
2020-05-06 16:15:51 +00:00
|
|
|
Requires: python-requests >= 2.7.0
|
2019-10-08 07:10:50 +00:00
|
|
|
Requires: python-scp
|
|
|
|
|
Requires: python-setuptools >= 38.4.0
|
|
|
|
|
Requires: python-textfsm
|
2023-01-02 12:53:05 +00:00
|
|
|
Requires: python-ttp
|
2023-08-23 11:04:54 +00:00
|
|
|
Requires: python-ttp-templates
|
2021-10-14 14:28:31 +00:00
|
|
|
Requires: python-typing_extensions
|
2020-05-21 18:31:16 +00:00
|
|
|
Requires(post): update-alternatives
|
2022-01-13 12:47:38 +00:00
|
|
|
Requires(postun):update-alternatives
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module Jinja2}
|
|
|
|
|
BuildRequires: %{python_module PyYAML}
|
|
|
|
|
BuildRequires: %{python_module cffi >= 1.11.3}
|
|
|
|
|
BuildRequires: %{python_module ddt}
|
2022-10-25 18:12:25 +00:00
|
|
|
BuildRequires: %{python_module junos-eznc >= 2.6.3}
|
2021-10-14 14:28:31 +00:00
|
|
|
BuildRequires: %{python_module lxml >= 4.3.0}
|
|
|
|
|
BuildRequires: %{python_module ncclient}
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildRequires: %{python_module netaddr}
|
2022-08-05 04:59:58 +00:00
|
|
|
BuildRequires: %{python_module netmiko >= 4.0.0}
|
2022-10-25 18:12:25 +00:00
|
|
|
BuildRequires: %{python_module netutils >= 1.0.0}
|
2020-09-04 05:33:30 +00:00
|
|
|
BuildRequires: %{python_module paramiko >= 2.6.0}
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildRequires: %{python_module pyeapi >= 0.8.2}
|
2021-10-14 14:28:31 +00:00
|
|
|
BuildRequires: %{python_module pytest >= 5.4.3}
|
2020-05-06 16:15:51 +00:00
|
|
|
BuildRequires: %{python_module requests >= 2.7.0}
|
2019-10-08 07:10:50 +00:00
|
|
|
BuildRequires: %{python_module scp}
|
|
|
|
|
BuildRequires: %{python_module setuptools >= 38.4.0}
|
|
|
|
|
BuildRequires: %{python_module textfsm}
|
2022-10-25 18:12:25 +00:00
|
|
|
BuildRequires: %{python_module ttp-templates}
|
|
|
|
|
BuildRequires: %{python_module ttp}
|
2021-10-14 14:28:31 +00:00
|
|
|
BuildRequires: %{python_module typing_extensions}
|
2019-10-08 07:10:50 +00:00
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
NAPALM is a Python library that implements a set of functions to
|
|
|
|
|
interact with different router vendor devices using a unified API.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-03-24 13:42:27 +00:00
|
|
|
%autosetup -p1 -n napalm-%{version}
|
2022-01-13 12:47:38 +00:00
|
|
|
sed -i '1{/env python/d}' napalm/pyIOSXR/*.py
|
2019-10-08 07:10:50 +00:00
|
|
|
|
|
|
|
|
%build
|
2023-09-06 02:58:18 +00:00
|
|
|
%pyproject_wheel
|
2019-10-08 07:10:50 +00:00
|
|
|
|
|
|
|
|
%install
|
2023-09-06 02:58:18 +00:00
|
|
|
%pyproject_install
|
2020-05-21 18:31:16 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/napalm
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_validate
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_test
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_configure
|
2019-10-08 07:10:50 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# FIXME: JunOS related unit tests are know to be broken with junos-eznc-2.3.0.
|
|
|
|
|
# Do not run those for now. https://github.com/napalm-automation/napalm/issues/1060
|
|
|
|
|
rm -Rf test/junos/
|
|
|
|
|
%pytest
|
|
|
|
|
|
2020-05-21 18:31:16 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative napalm
|
|
|
|
|
%python_install_alternative cl_napalm_validate
|
|
|
|
|
%python_install_alternative cl_napalm_test
|
|
|
|
|
%python_install_alternative cl_napalm_configure
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative napalm
|
|
|
|
|
%python_uninstall_alternative cl_napalm_validate
|
|
|
|
|
%python_uninstall_alternative cl_napalm_test
|
|
|
|
|
%python_uninstall_alternative cl_napalm_configure
|
|
|
|
|
|
2019-10-08 07:10:50 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.md
|
2020-05-21 18:31:16 +00:00
|
|
|
%python_alternative %{_bindir}/cl_napalm_configure
|
|
|
|
|
%python_alternative %{_bindir}/cl_napalm_test
|
|
|
|
|
%python_alternative %{_bindir}/cl_napalm_validate
|
|
|
|
|
%python_alternative %{_bindir}/napalm
|
2023-09-06 02:58:18 +00:00
|
|
|
%{python_sitelib}/napalm
|
|
|
|
|
%{python_sitelib}/napalm-%{version}.dist-info
|
2019-10-08 07:10:50 +00:00
|
|
|
|
|
|
|
|
%changelog
|