commit fc783cb906d0b6b316bcb63559e20a3a62e4e96984545e9e2f3d823d2b3a57d3 Author: Tomáš Chvátal Date: Tue Mar 24 07:38:33 2020 +0000 Accepting request 787598 from home:mnhauke resurrect package python-snimpy OBS-URL: https://build.opensuse.org/request/show/787598 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-snimpy?expand=0&rev=1 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/python-snimpy-disable-IPv6-tests.diff b/python-snimpy-disable-IPv6-tests.diff new file mode 100644 index 0000000..aaa4ed8 --- /dev/null +++ b/python-snimpy-disable-IPv6-tests.diff @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..e2a77d4 --- /dev/null +++ b/python-snimpy.changes @@ -0,0 +1,18 @@ +------------------------------------------------------------------- +Mon Mar 23 22:22:07 UTC 2020 - Martin Hauke + +- Convert to singlespec +- Update to version 0.8.13 + * Compatibility with Python 3.7. + * Fix an issue with implied index when reusing indexes between + tables. +- Update to version 0.8.12 + * Support for more recent versions of IPython. + * Support for SNMPv3 context name. + * Support for notification nodes (MIB only). + +------------------------------------------------------------------- +Wed Oct 12 18:30:08 UTC 2016 - mardnh@gmx.de + +- initial package, version 0.8.11 + diff --git a/python-snimpy.spec b/python-snimpy.spec new file mode 100644 index 0000000..1a1efa7 --- /dev/null +++ b/python-snimpy.spec @@ -0,0 +1,93 @@ +# +# spec file for package python-snimpy +# +# Copyright (c) 2016-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 http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-snimpy +Version: 0.8.13 +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 setuptools} +BuildRequires: %{python_module vcversioner} +BuildRequires: fdupes +BuildRequires: libsmi-devel +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module cffi >= 1.0.0} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module pycryptodomex} +BuildRequires: %{python_module pysnmp >= 4} +BuildRequires: %{python_module setuptools} +# /SECTION +Requires: python-cffi >= 1.0.0 +Requires: python-pycryptodomex +Requires: python-pysnmp >= 4 +Requires: python-setuptools +%python_subpackages + +%description +Snimpy is a Python-based tool providing a simple interface to build +SNMP query. You can either use Snimpy interactively through its console +(derived from Python own console or from IPython_ if available) or write +Snimpy scripts which are just Python scripts with some global variables +available. + +Snimpy is aimed at being the more Pythonic possible. You should forget +that you are doing SNMP requests. Snimpy will rely on MIB to hide SNMP +details. Here are some "features": + + * MIB parser based on libsmi (through CFFI) + * SNMP requests are handled by PySNMP (SNMPv1, SNMPv2 and SNMPv3 + support) + * scalars are just attributes of your session object + * columns are like a Python dictionary and made available as an + attribute + * getting an attribute is like issuing a GET method + * setting an attribute is like issuing a SET method + * iterating over a table is like using GETNEXT + * when something goes wrong, you get an exception + +%prep +%setup -q -n snimpy-%{version} +%patch0 -p1 + +%build +export CFLAGS="%{optflags}" +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%python_exec setup.py test + +%files %{python_files} +%license docs/license.rst +%doc AUTHORS.rst README.rst +%python3_only %{_bindir}/snimpy +%python3_only %{_mandir}/man1/snimpy.1%{ext_man} +%{python_sitearch}/snimpy* + +%changelog diff --git a/snimpy-0.8.13.tar.gz b/snimpy-0.8.13.tar.gz new file mode 100644 index 0000000..1975b82 --- /dev/null +++ b/snimpy-0.8.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98b1790977b435332c03ab2603f6621eeeee69a50453ac01ca55dc7696d08535 +size 74574