Blob Blame History Raw
Name: py-radix
Summary: Radix tree data structure for Python
Version: 0.5
Release: 6%{?dist}
Source0: http://www2.mindrot.org/files/py-radix/py-radix-%{version}.tar.gz
Patch0: py-radix-0.5-memleak.patch
License: BSD with advertising
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: python-devel
Url: http://www.mindrot.org/py-radix.html

%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}


%description
py-radix is an implementation of a radix tree for Python, which 
supports storage and lookups of IPv4 and IPv6 networks. 

The radix tree (a.k.a Patricia tree) is the data structure most 
commonly used for routing table lookups. It efficiently stores 
network prefixes of varying lengths and allows fast lookups of 
containing networks. py-radix's implementation is built solely 
for networks (the data structure itself is more general). 

%prep
%setup -q
%patch0 -p1
rm -f inet_ntop.c strlcpy.c
touch inet_ntop.c strlcpy.c

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --root=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{python_sitearch}/radix*
%doc LICENSE README TODO ChangeLog

%changelog
* Fri Oct 23 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.5-6
- Add patch by Alexander Sabourenkov to fix memory leak (Debian #512830)

* Mon Oct 12 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.5-5
- remove inet_ntop.c and strlcpy.c for safety.  They're only used on
  Windows.

* Thu Oct  1 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.5-4
- more package cleanups during review
  - quiet setup, clean buildroot at install, drop python Requires,
    add dist tag.

* Thu Oct  1 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.5-2
- update for Fedora packaging guidelines

* Wed Jun 28 2006 Damien Miller <djm@mindrot.org>
- Build RPM