File python-pysnmp.spec of Package python-pysnmp

# Created by pyp2rpm-3.2.3
%global pypi_name pysnmp

Name:           python-%{pypi_name}
Version:        4.4.3
Release:        1%{?dist}
Summary:        An SNMP engine written in Python

License:        BSD
URL:            https://github.com/etingof/pysnmp
Source0:        https://pypi.io/packages/source/p/pysnmp/pysnmp-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

%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     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
 
Requires:       python2-pyasn1 >= 0.2.3
Requires:       python2-pysmi
Requires:       python2-pycryptodomex

%description -n python2-%{pypi_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 %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py2_build

%install
%py2_install

%files -n python2-%{pypi_name}
%if (0%{?rhel} >= 7) || (0%{?suse_version} >= 1315)
%license docs/source/license.rst LICENSE.txt
%endif
%doc README.md
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Mon Dec 25 2017 Yunfei Shi <shiyf2@lenovo.com> - 4.4.3-1
- Initial package.
openSUSE Build Service is sponsored by