%{?python_enable_dependency_generator}
# pycryptodomex is optional.
# we need the lextudio pyasn1 specifically for this one
%global __requires_exclude pycryptodomex|pyasn1
%global pkg_name pysnmp-lextudio
%global mod_name pysnmp_lextudio
%global srcname %{mod_name}
Name: %{pkg_name}
Version: 5.0.26
Release: 2%{?dist}
Summary: An SNMP engine written in Python
License: BSD
URL: https://github.com/lextudio/pysnmp
Source0: %{pypi_source}
BuildArch: noarch
Requires: net-snmp
# Encryption not needed for this build
#Patch0: 0001-strong-crypto-moved-to-pysnmpcrypto.patch
%description
This is a Python implementation of SNMP v.1/v.2c engine. It's
general functionality is to assemble/disassemble SNMP messages
from/into given SNMP Object IDs along with associated values.
PySNMP also provides a few transport methods specific to TCP/IP
networking.
%package -n python3-%{name}
Summary: %{summary}
Requires: python3dist(pyasn1) >= 0.5.1
Conflicts: python3-pysnmp
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
This is a Python implementation of SNMP v.1/v.2c engine. It's
general functionality is to assemble/disassemble SNMP messages
from/into given SNMP Object IDs along with associated values.
PySNMP also provides a few transport methods specific to TCP/IP
networking.
%prep
%autosetup -n %{mod_name}-%{version} -p1
%build
%py3_build
%install
%py3_install
%files -n python3-%{name}
%doc README.md examples/ docs/
%license LICENSE.rst
%{python3_sitelib}/pysnmp/
%{python3_sitelib}/%{mod_name}*.egg-info
%changelog
* Mon Mar 18 2024 Lon Hohberger <lon@redhat.com> - 5.0.26-2
- Update to use newer pyasn1 packaging
* Thu Feb 22 2024 Lon Hohberger <lon@redhat.com> - 5.0.26-1
- Initial packaging of pysnmp-lextudio based on pysnmp RPMs