%{?!python3_pkgversion:%global python3_pkgversion 3} %global srcname easysnmp Name: python-easysnmp Version: 0.2.6 Release: 1%{?dist} Summary: A blazingly fast and Pythonic SNMP library License: BSD URL: https://github.com/easysnmp/easysnmp Source0: https://github.com/%{srcname}/%{srcname}/archive/refs/tags/%{version}.tar.gz BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python3-pytest BuildRequires: net-snmp-devel BuildRequires: gcc %{?python_enable_dependency_generator} %global _description %{expand: Easy SNMP is a fork of Net-SNMP Python Bindings that attempts to bring a more Pythonic interface to the library. Check out the Net-SNMP website for more information about SNMP. This module provides a full-featured SNMP client API and supports all dialects of the SNMP protocol.} %description %_description %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %if %{undefined python_enable_dependency_generator} && %{undefined python_disable_dependency_generator} # Put manual requires here: Requires: python%{python3_pkgversion}-foo %endif %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %build %py3_build %install rm -rf $RPM_BUILD_ROOT %py3_install %check #%%{__python3} -m pytest %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.rst CHANGELOG.rst docs # For arch-specific packages: sitearch %{python3_sitearch}/%{srcname}/ %{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog * Mon May 20 2024 Ján ONDREJ (SAL) - initial release