diff --git a/python-napalm.changes b/python-napalm.changes index f2df1b6..ed6848c 100644 --- a/python-napalm.changes +++ b/python-napalm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 6 02:57:22 UTC 2023 - Steve Kowalik + +- Add patch remove-future-requirement.patch, remove requirement of + future module. +- Switch to pyproject macros. +- Stop using greedy globs in %files. + ------------------------------------------------------------------- Wed Aug 23 08:11:59 UTC 2023 - Georg Pfuetzenreuter diff --git a/python-napalm.spec b/python-napalm.spec index 58dce18..3f54b3f 100644 --- a/python-napalm.spec +++ b/python-napalm.spec @@ -16,28 +16,27 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-napalm Version: 4.1.0 Release: 0 Summary: Network Automation and Programmability Abstraction Layer License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/napalm-automation/napalm Source: https://github.com/napalm-automation/napalm/archive/%{version}.tar.gz#/napalm-%{version}.tar.gz # https://github.com/napalm-automation/napalm/issues/1594 Patch0: python-napalm-no-mock.patch # https://github.com/napalm-automation/napalm/pull/1796 Patch1: napalm-gh-pr1796-xmlgetparent.patch +# https://github.com/napalm-automation/napalm/pull/2002 +Patch2: remove-future-requirement.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Jinja2 Requires: python-PyYAML Requires: python-cffi >= 1.11.3 -Requires: python-ciscoconfparse -Requires: python-future Requires: python-junos-eznc >= 2.6.3 Requires: python-lxml >= 4.3.0 Requires: python-ncclient @@ -61,7 +60,6 @@ BuildRequires: %{python_module Jinja2} BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module cffi >= 1.11.3} BuildRequires: %{python_module ddt} -BuildRequires: %{python_module future} BuildRequires: %{python_module junos-eznc >= 2.6.3} BuildRequires: %{python_module lxml >= 4.3.0} BuildRequires: %{python_module ncclient} @@ -90,10 +88,10 @@ interact with different router vendor devices using a unified API. sed -i '1{/env python/d}' napalm/pyIOSXR/*.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/napalm %python_clone -a %{buildroot}%{_bindir}/cl_napalm_validate %python_clone -a %{buildroot}%{_bindir}/cl_napalm_test @@ -125,6 +123,7 @@ rm -Rf test/junos/ %python_alternative %{_bindir}/cl_napalm_test %python_alternative %{_bindir}/cl_napalm_validate %python_alternative %{_bindir}/napalm -%{python_sitelib}/* +%{python_sitelib}/napalm +%{python_sitelib}/napalm-%{version}.dist-info %changelog diff --git a/remove-future-requirement.patch b/remove-future-requirement.patch new file mode 100644 index 0000000..427b301 --- /dev/null +++ b/remove-future-requirement.patch @@ -0,0 +1,23 @@ +From e384ae2dd6a2e157788f325f3e4fdf92349daec5 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Wed, 6 Sep 2023 12:52:41 +1000 +Subject: [PATCH] Remove future requirement + +Now that we support Python >= 3.7, we can remove the requirement on +the future module, which appears to be unused. +--- + requirements.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/requirements.txt b/requirements.txt +index 57ecd72eb..3359b30a6 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -2,7 +2,6 @@ setuptools>=38.4.0 + cffi>=1.11.3 + paramiko>=2.6.0 + requests>=2.7.0 +-future + textfsm + jinja2 + netaddr