diff --git a/python-snimpy-disable-IPv6-tests.diff b/python-snimpy-disable-IPv6-tests.diff deleted file mode 100644 index aaa4ed8..0000000 --- a/python-snimpy-disable-IPv6-tests.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/tests/test_snmp.py b/tests/test_snmp.py -index 9ee8b93..c354f2c 100644 ---- a/tests/test_snmp.py -+++ b/tests/test_snmp.py -@@ -435,6 +435,3 @@ class TestSnmpTransports(unittest.TestCase): - """Test IPv4 transport with name resolution""" - self._test(False, "localhost") - -- def testIpv6(self): -- """Test IPv6 transport""" -- self._test(True, "[::1]") diff --git a/python-snimpy.changes b/python-snimpy.changes index 23ccb18..1edd55f 100644 --- a/python-snimpy.changes +++ b/python-snimpy.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Aug 1 06:20:20 UTC 2023 - Steve Kowalik + +- Update to 1.0.1: + * Switch to pysnmp-lextudio, a maintained fork of PySNMP. +- Drop patch python-snimpy-disable-IPv6-tests.diff, no longer required. +- Use pyproject macros. +- Stop using greedy globs in %files. + ------------------------------------------------------------------- Wed Apr 20 09:32:37 UTC 2022 - pgajdos@suse.com diff --git a/python-snimpy.spec b/python-snimpy.spec index 87c8c21..52bca31 100644 --- a/python-snimpy.spec +++ b/python-snimpy.spec @@ -1,7 +1,7 @@ # # spec file for package python-snimpy # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2016-2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -17,33 +17,30 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%global skip_python2 1 Name: python-snimpy -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: Interactive SNMP tool License: ISC -Group: Development/Languages/Python URL: https://github.com/vincentbernat/snimpy Source: https://files.pythonhosted.org/packages/source/s/snimpy/snimpy-%{version}.tar.gz -Patch0: python-snimpy-disable-IPv6-tests.diff BuildRequires: %{python_module cffi >= 1.0.0} BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module vcversioner} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: libsmi-devel BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module cffi >= 1.0.0} -BuildRequires: %{python_module pycryptodomex} -BuildRequires: %{python_module pysnmp >= 4} +BuildRequires: %{python_module pysnmp >= 5} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} # /SECTION Requires: python-cffi >= 1.0.0 -Requires: python-pycryptodomex -Requires: python-pysnmp >= 4 +Requires: python-pysnmp >= 5 Requires: python-setuptools Requires(post): update-alternatives Requires(postun):update-alternatives @@ -72,23 +69,20 @@ details. Here are some "features": * when something goes wrong, you get an exception %prep -%setup -q -n snimpy-%{version} -%patch0 -p1 +%autosetup -p1 -n snimpy-%{version} %build export CFLAGS="%{optflags}" -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %python_clone -a %{buildroot}%{_bindir}/snimpy %python_clone -a %{buildroot}%{_mandir}/man1/snimpy.1 %check -# https://github.com/vincentbernat/snimpy/issues/98 -sed -i 's:import mock:from unittest import mock:' tests/test_{basictypes,main}.py -%python_exec -m unittest discover tests -v +%pytest_arch %post %python_install_alternative snimpy snimpy.1 @@ -101,6 +95,7 @@ sed -i 's:import mock:from unittest import mock:' tests/test_{basictypes,main}.p %doc AUTHORS.rst README.rst %python_alternative %{_bindir}/snimpy %python_alternative %{_mandir}/man1/snimpy.1%{ext_man} -%{python_sitearch}/snimpy* +%{python_sitearch}/snimpy +%{python_sitearch}/snimpy-%{version}.dist-info %changelog diff --git a/snimpy-1.0.0.tar.gz b/snimpy-1.0.0.tar.gz deleted file mode 100644 index 6240ff0..0000000 --- a/snimpy-1.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65bfe796d3d0234b829a96936bc868c3741743a89179367089bc673ca03c591a -size 76425 diff --git a/snimpy-1.0.1.tar.gz b/snimpy-1.0.1.tar.gz new file mode 100644 index 0000000..93df524 --- /dev/null +++ b/snimpy-1.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17ffac15ee3399de4724b4330426a7406a2b52c157cfcf3a4757f1c79144c636 +size 76908