14b5928
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
14b5928
14b5928
Name:           pysnmp
14b5928
Version:        2.0.9
14b5928
Release:        2%{?dist}
14b5928
Summary:        SNMP engine written in Python
14b5928
14b5928
Group:          Development/Libraries
14b5928
License:        BSD
14b5928
URL:            http://pysnmp.sourceforge.net/
14b5928
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
14b5928
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14b5928
BuildArch:      noarch
14b5928
14b5928
BuildRequires:  python
14b5928
BuildRequires:  python-setuptools-devel
14b5928
14b5928
Requires:       net-snmp
14b5928
14b5928
%description
14b5928
This is a Python implementation of SNMP v.1/v.2c engine. It's
14b5928
general functionality is to assemble/disassemble SNMP messages
14b5928
from/into given SNMP Object IDs along with associated values.
14b5928
PySNMP also provides a few transport methods specific to TCP/IP
14b5928
networking.
14b5928
14b5928
14b5928
%prep
14b5928
%setup -q
14b5928
#Remove exec permission from example files
14b5928
chmod -x examples/*.py
14b5928
#Change shebang
14b5928
sed -i -e '1d;2i#!/usr/bin/python' examples/*.py
14b5928
14b5928
%build
14b5928
python ./setup.py build
14b5928
14b5928
14b5928
%install
14b5928
rm -rf %{buildroot}
14b5928
python ./setup.py install -O1 --skip-build --root=%{buildroot}
14b5928
14b5928
14b5928
%clean
14b5928
rm -rf %{buildroot}
14b5928
14b5928
14b5928
%files
14b5928
%defattr(-,root,root,-)
14b5928
%doc CHANGES LICENSE README examples/ html/
14b5928
%{python_sitelib}/%{name}/
14b5928
%{python_sitelib}/%{name}*.egg-info
14b5928
14b5928
14b5928
%changelog
14b5928
* Wed Jan 28 2008 Fabian Affolter <fabian@bernewireless.net> - 2.0.9-2
14b5928
- Changed license to BSD (#478603)
14b5928
- Removed duplicated content, removed examples subpackage
14b5928
14b5928
* Thu Jan 01 2008 Fabian Affolter <fabian@bernewireless.net> - 2.0.9-1
14b5928
- Initial spec for Fedora