commit d46f5fa32f002926c2004a3102b3b24015d1fce8e339c524d4136ac105ad56f3 Author: Nico Krapp Date: Tue Mar 4 13:27:58 2025 +0000 - Update to 1.0.4 * Fixes documentation build issue for modules section on readthedocs * Some fixes for system test - from version 1.0.3 * Provides a critical bug fix introduced by PR#220 * Fixed all system tests and provides some enhancements for unit tests - Drop no-more-imp.patch, merged upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyeapi?expand=0&rev=15 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/no-more-imp.patch b/no-more-imp.patch new file mode 100644 index 0000000..4b63b71 --- /dev/null +++ b/no-more-imp.patch @@ -0,0 +1,33 @@ +From d6fe3ef701e25ebb599bbfeec9d30649e37c9940 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Mon, 19 Feb 2024 16:50:47 +1100 +Subject: [PATCH] Switch to importlib for realoading + +Since 3.7, importlib has supported a reload method, and since 3.12 has +removed the imp module entirely, we should switch to using importlib. +--- + test/unit/test_client.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/unit/test_client.py b/test/unit/test_client.py +index 3472951..0136add 100644 +--- a/test/unit/test_client.py ++++ b/test/unit/test_client.py +@@ -32,7 +32,7 @@ + import sys + import os + import unittest +-import imp ++import importlib + + sys.path.append(os.path.join(os.path.dirname(__file__), '../lib')) + +@@ -227,7 +227,7 @@ class TestClient(unittest.TestCase): + def setUp(self): + if 'EAPI_CONF' in os.environ: + del os.environ['EAPI_CONF'] +- imp.reload(pyeapi.client) ++ importlib.reload(pyeapi.client) + + def test_load_config_for_connection_with_filename(self): + conf = get_fixture('eapi.conf') diff --git a/pyeapi-1.0.2.tar.gz b/pyeapi-1.0.2.tar.gz new file mode 100644 index 0000000..5e0c06d --- /dev/null +++ b/pyeapi-1.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:563a80bb19451df7dd7b6e9e38489dee67ebeaf2f54de296e8ae0b26cd68a297 +size 146942 diff --git a/pyeapi-1.0.4.tar.gz b/pyeapi-1.0.4.tar.gz new file mode 100644 index 0000000..a437ab2 --- /dev/null +++ b/pyeapi-1.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05920677246823cd3dddf7d4d0f831fbc86fd416f356706a03bc56a291d78f3d +size 151406 diff --git a/python-pyeapi.changes b/python-pyeapi.changes new file mode 100644 index 0000000..d617ce0 --- /dev/null +++ b/python-pyeapi.changes @@ -0,0 +1,78 @@ +------------------------------------------------------------------- +Tue Mar 4 12:42:13 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 1.0.4 + * Fixes documentation build issue for modules section on readthedocs + * Some fixes for system test +- from version 1.0.3 + * Provides a critical bug fix introduced by PR#220 + * Fixed all system tests and provides some enhancements for unit tests +- Drop no-more-imp.patch, merged upstream + +------------------------------------------------------------------- +Mon Feb 19 06:06:04 UTC 2024 - Steve Kowalik + +- Switch to autosetup macro. +- Add patch no-more-imp.patch: + * Use importlib, rather than imp. + +------------------------------------------------------------------- +Mon Jan 1 20:15:51 UTC 2024 - Dirk Müller + +- update to 1.0.2: + * Fixed all system tests and provides some enhancements for + unit tests +- update to 1.0.1: + * This is an interim release for EOS integration purpose +- update to 1.0.0: + * This is a Python3 only release (Python2 is no longer + supported) + * The minimum supported python version is 3.7 + * Arista EOS 4.22 or later is required (for on-box use cases + only) + +------------------------------------------------------------------- +Wed Apr 6 12:55:49 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build + +------------------------------------------------------------------- +Tue Jan 11 22:08:03 UTC 2022 - Ben Greiner + +- Fix deprecated collections.abc imports still not fully fixed in + 0.8.4 -- gh#arista-eosplus/pyeapi#195 +- Use the PyPI archive, because the git source has the wrong + version in its metadata + +------------------------------------------------------------------- +Sat Nov 14 13:15:51 UTC 2020 - Martin Hauke + +- Update to version 0.8.4 + * Fix deprecated 'collections' dependancy + * Power support(ppc64le) with continuous integration + +------------------------------------------------------------------- +Sun Jan 26 12:27:09 UTC 2020 - Martin Hauke + +- Update to version 0.8.3 + * This release includes checks on ACL regexp statement of + 'match', adopts changes of CLI described in Field Notice 0039 +- Use github source URL + +------------------------------------------------------------------- +Sun Sep 29 17:21:29 UTC 2019 - Martin Hauke + +- Update to version 0.8.2 +- Specfile cleanup + +------------------------------------------------------------------- +Mon Aug 7 07:47:52 UTC 2017 - mardnh@gmx.de + +- Update to version 0.8.1 +- Convert to singlespec + +------------------------------------------------------------------- +Wed Aug 31 10:46:45 UTC 2016 - mardnh@gmx.de + +- initial package, version 0.6.1 + diff --git a/python-pyeapi.spec b/python-pyeapi.spec new file mode 100644 index 0000000..a889826 --- /dev/null +++ b/python-pyeapi.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-pyeapi +# +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2017-2020, Martin Hauke +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-pyeapi +Version: 1.0.4 +Release: 0 +Summary: Python Client for eAPI +License: BSD-3-Clause +URL: https://github.com/arista-eosplus/pyeapi +Source: https://files.pythonhosted.org/packages/source/p/pyeapi/pyeapi-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module netaddr} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-netaddr +BuildArch: noarch +%python_subpackages + +%description +The Python Client for eAPI (pyeapi) is a native Python library wrapper around +Arista EOS eAPI. It provides a set of Python language bindings for configuring +Arista EOS nodes. + +The Python library can be used to communicate with EOS either locally +(on-box) or remotely (off-box). It uses a standard INI-style configuration file +to specify one or more nodes and connection profiles. + +The pyeapi library also provides an API layer for building native Python +objects to interact with the destination nodes. The API layer is a convenient +implementation for working with the EOS configuration and is extensible for +developing custom implementations. + +%prep +%autosetup -p1 -n pyeapi-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%fdupes %{buildroot} + +%check +%pytest test/unit + +%files %{python_files} +%license LICENSE +%doc CHANGELOG.md README.md +%doc examples +%{python_sitelib}/pyeapi +%{python_sitelib}/pyeapi-%{version}.dist-info + +%changelog