%global modname pysmi
%global srcname pysmi_lextudio
%{?python_disable_dependency_generator}
Name: python-smi-lextudio
Version: 1.1.13
Release: 1%{?dist}
Summary: A Python implementation of SNMP/SMI MIB parsing and conversion library
License: BSD
URL: https://github.com/lextudio/pysmi
Source0: %{pypi_source}
BuildArch: noarch
%description
PySMI is a pure-Python implementation of SNMP SMI MIB parser. This tool is
designed to turn ASN.1 MIBs into various formats. As of this moment, JSON
and pysnmp modules can be generated from ASN.1 MIBs.
- Understands SMIv1, SMIv2 and de-facto SMI dialects
- Turns MIBs into pysnmp classes and JSON documents
- Maintains an index of MIB objects over many MIB modules
- Automatically pulls ASN.1 MIBs from local directories, ZIP archives, HTTP
and FTP servers
%package -n python3-smi-lextudio
Summary: %{summary}
Conflicts: python3-smi
Requires: python3-ply >= 3.11
# Note: Works with requests 2.25.1 in RHEL9, despite 2.26.0 in pyproject.toml
Requires: python3-requests >= 2.25.1
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-ply
%{?python_provide:%python_provide python3-smi-lextudio}
%description -n python3-smi-lextudio
PySMI is a pure-Python implementation of SNMP SMI MIB parser. This tool is
designed to turn ASN.1 MIBs into various formats. As of this moment, JSON
and pysnmp modules can be generated from ASN.1 MIBs.
- Understands SMIv1, SMIv2 and de-facto SMI dialects
- Turns MIBs into pysnmp classes and JSON documents
- Maintains an index of MIB objects over many MIB modules
- Automatically pulls ASN.1 MIBs from local directories, ZIP archives, HTTP
and FTP servers
%prep
%autosetup -n %{srcname}-%{version}
%build
%py3_build
%install
%py3_install
# Tests depend on python3-pysnmp and python3-pysnmp depends on python3-smi.
# This leads to a circular dependency that may cause side-effects.
#%check
#%{__python3} setup.py test
%files -n python3-smi-lextudio
%doc README.md examples/*.py
%license LICENSE.rst
%{_bindir}/mibcopy
%{_bindir}/mibdump
%{python3_sitelib}/*.egg-info
%{python3_sitelib}/%{modname}/
%changelog
* Thu Feb 22 2024 Lon Hohberger <lon@redhat.com> - 1.1.13-1
- Initial packaging of python-smi-lextudio, a python-smi replacement