137 lines
4.1 KiB
RPMSpec
137 lines
4.1 KiB
RPMSpec
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
#====================================================================#
|
|
|
|
Name: python-netaddr
|
|
Version: 0.7
|
|
Release: 1%{?dist}
|
|
Summary: Network address manipulation, done Pythonically
|
|
|
|
Group: Development/Libraries
|
|
License: BSD
|
|
URL: http://code.google.com/p/netaddr/
|
|
Source0: http://netaddr.googlecode.com/files/netaddr-%{version}.tar.gz
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: python-devel >= 2.4
|
|
|
|
|
|
%description
|
|
netaddr is a Python library for the representation and manipulation of
|
|
various common network address formats and notations.
|
|
|
|
It takes the hassle out of fiddling with innumerable variations of
|
|
network addresses, presenting a consistent, extensible, easy-to-use
|
|
and above all Pythonic API.
|
|
|
|
With it you can represent, validate, convert, categorize, iterate,
|
|
generate, slice (and dice) :-
|
|
|
|
* IP version 4
|
|
* IP version 6
|
|
* CIDR (Classless Inter-Domain Routing) both IPv4 and IPv6
|
|
* MAC (Media Access Control) and IEEE EUI-48 and EUI-64
|
|
* Support for arbitrary IP address ranges with CIDR interoperability
|
|
* User friendly alternative IPv4 range syntax using netaddr's
|
|
glob-style Wildcard addresses
|
|
|
|
For examples see the project wiki :-
|
|
|
|
http://code.google.com/p/netaddr/wiki/NetAddrExamples
|
|
|
|
API documentation (auto-generated with epydoc) :-
|
|
|
|
http://packages.python.org/netaddr/
|
|
|
|
|
|
%prep
|
|
%setup -q -n netaddr-%{version}
|
|
chmod 644 tests/*
|
|
|
|
# Make rpmlint happy, get rid of DOS line endings
|
|
%{__sed} -i 's/\r//' netaddr/*.py
|
|
%{__sed} -i 's/\r//' netaddr/ip/*.py
|
|
%{__sed} -i 's/\r//' netaddr/eui/*.idx
|
|
|
|
# Make rpmlint happy, rip out python shebang lines from most python
|
|
# modules
|
|
find netaddr -name "*.py" | \
|
|
xargs %{__perl} -ni -e 'print unless /usr\/bin\/python|env\s+python/'
|
|
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
|
%check
|
|
python tests/ut_netaddr.py
|
|
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS CHANGELOG COPYRIGHT GLOSSARY INSTALL LICENSE PKG-INFO
|
|
%doc README docs/api/ tests
|
|
%{python_sitelib}/*
|
|
|
|
|
|
%changelog
|
|
* Wed Aug 12 2009 John Eckersberg <jeckersb@redhat.com> - 0.7-1
|
|
- Upstream release 0.7
|
|
|
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Wed Jul 22 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.3-2
|
|
- Minor tweaks to spec file aligning with latest Fedora packaging guidelines
|
|
- Enforce python 2.4 dependency as needed by netaddr >= 0.6.2
|
|
- Drop BR on python-setuptool as it is not imported in setup.py
|
|
- Drop BR on dos2unix use sed instead
|
|
- Align description with that of delivered PKG-INFO
|
|
- Rip out python shebangs
|
|
- Add %%check section to enable tests
|
|
- Thanks to Gareth Armstrong <gareth.armstrong@hp.com>
|
|
|
|
* Tue Jun 23 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.3-1
|
|
- New upstream bugfix release
|
|
|
|
* Mon Apr 13 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.2-1
|
|
- New upstream bugfix release
|
|
|
|
* Tue Apr 7 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.1-1
|
|
- New upstream bugfix release
|
|
|
|
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-2
|
|
- Add BuildDepends on dos2unix to clean up some upstream sources
|
|
|
|
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-1
|
|
- New upstream version
|
|
|
|
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.2-2
|
|
- Rebuild for Python 2.6
|
|
|
|
* Fri Oct 10 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.2-1
|
|
- New upstream version, bug fixes for 0.5.1
|
|
|
|
* Tue Sep 23 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.1-1
|
|
- New upstream version, bug fixes for 0.5
|
|
|
|
* Sun Sep 21 2008 John Eckersberg <jeckersb@redhat.com> - 0.5-1
|
|
- New upstream version
|
|
|
|
* Mon Aug 11 2008 John Eckersberg <jeckersb@redhat.com> - 0.4-1
|
|
- Initial packaging for Fedora
|
|
|