14
0
forked from pool/python-pyeapi

- 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)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyeapi?expand=0&rev=11
This commit is contained in:
2024-01-01 20:18:44 +00:00
committed by Git OBS Bridge
parent b168beb1c0
commit a1f8436cf7
4 changed files with 26 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyeapi
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2017-2020, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -17,10 +17,9 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-pyeapi
Version: 0.8.4
Version: 1.0.2
Release: 0
Summary: Python Client for eAPI
License: BSD-3-Clause
@@ -28,8 +27,9 @@ Group: Development/Languages/Python
URL: https://github.com/arista-eosplus/pyeapi
Source: https://files.pythonhosted.org/packages/source/p/pyeapi/pyeapi-%{version}.tar.gz
BuildRequires: %{python_module netaddr}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-netaddr
@@ -52,17 +52,12 @@ developing custom implementations.
%prep
%setup -q -n pyeapi-%{version}
# Deprecated collections usage since Python 3.3
sed -i 's/from collections import/from collections.abc import/' pyeapi/api/abstract.py
sed -i 's/collections.Iterable/collections.abc.Iterable/' test/unit/test_utils.py
# https://github.com/arista-eosplus/pyeapi/issues/224
sed -i 's/from mock/from unittest.mock/' test/*/test*.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%fdupes %{buildroot}
%check
@@ -73,6 +68,6 @@ sed -i 's/from mock/from unittest.mock/' test/*/test*.py
%doc CHANGELOG.md README.md
%doc examples
%{python_sitelib}/pyeapi
%{python_sitelib}/pyeapi-%{version}*-info
%{python_sitelib}/pyeapi-%{version}.dist-info
%changelog