2008-08-13 19:30:01 +00:00
|
|
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
|
2009-07-22 19:32:38 +00:00
|
|
|
#====================================================================#
|
|
|
|
|
2008-08-13 19:30:01 +00:00
|
|
|
Name: python-netaddr
|
2009-08-21 14:46:18 +00:00
|
|
|
Version: 0.7.2
|
2009-08-12 13:32:36 +00:00
|
|
|
Release: 1%{?dist}
|
2009-08-21 14:46:18 +00:00
|
|
|
Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
License: BSD
|
|
|
|
URL: http://code.google.com/p/netaddr/
|
|
|
|
Source0: http://netaddr.googlecode.com/files/netaddr-%{version}.tar.gz
|
2009-07-22 19:32:38 +00:00
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
2009-07-22 19:32:38 +00:00
|
|
|
BuildRequires: python-devel >= 2.4
|
|
|
|
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
%description
|
2009-08-21 14:46:18 +00:00
|
|
|
A pure Python network address representation and manipulation library.
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
netaddr provides a Pythonic way of working with :-
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
- IPv4 and IPv6 addresses and subnets (including CIDR notation)
|
|
|
|
- MAC (Media Access Control) addresses in multiple formats
|
|
|
|
- IEEE EUI-64, OUI and IAB identifiers
|
|
|
|
- a user friendly IP glob-style format
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
Included are routines for :-
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
- generating, sorting and summarizing IP addresses
|
|
|
|
- converting IP addresses and ranges between various different formats
|
|
|
|
- performing set based operations on groups of IP addresses and subnets
|
|
|
|
- arbitrary IP address range calculations and conversions
|
|
|
|
- querying IEEE OUI and IAB organisational information
|
|
|
|
- querying of IP standards related data from key IANA data sources
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
For examples please visit the example wiki pages :-
|
2008-08-13 19:30:01 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
http://code.google.com/p/netaddr/wiki/NetAddrExamples
|
2009-07-22 19:32:38 +00:00
|
|
|
|
2009-08-21 14:46:18 +00:00
|
|
|
Complete API documentation for the latest release is available online :-
|
|
|
|
|
|
|
|
http://packages.python.org/netaddr/
|
|
|
|
|
|
|
|
For details on history changes and updates see the CHANGELOG :-
|
|
|
|
|
|
|
|
http://code.google.com/p/netaddr/wiki/CHANGELOG
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n netaddr-%{version}
|
|
|
|
|
2009-07-22 19:32:38 +00:00
|
|
|
# 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/'
|
|
|
|
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%{__python} setup.py build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
2009-07-22 19:32:38 +00:00
|
|
|
rm -rf %{buildroot}
|
|
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
2009-08-17 17:28:02 +00:00
|
|
|
%{__python} netaddr/tests/__init__.py
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
%clean
|
2009-07-22 19:32:38 +00:00
|
|
|
rm -rf %{buildroot}
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files
|
2009-07-22 19:32:38 +00:00
|
|
|
%defattr(-,root,root,-)
|
2009-08-17 17:28:02 +00:00
|
|
|
%doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
|
|
|
|
%doc README docs/api/
|
2008-08-13 19:30:01 +00:00
|
|
|
%{python_sitelib}/*
|
2009-08-17 17:28:02 +00:00
|
|
|
%{_bindir}/netaddr
|
2008-08-13 19:30:01 +00:00
|
|
|
|
|
|
|
%changelog
|
2009-08-21 14:46:18 +00:00
|
|
|
* Fri Aug 21 2009 John Eckersberg <jeckersb@redhat.com> - 0.7.2-1
|
|
|
|
- New upstream release 0.7.2
|
|
|
|
- Updated Summary and Description with new values provided by upstream
|
|
|
|
|
2009-08-17 17:28:02 +00:00
|
|
|
* Mon Aug 17 2009 John Eckersberg <jeckersb@redhat.com> - 0.7.1-1
|
|
|
|
- New upstream release 0.7.1 fixes naming conflict with 'nash' by
|
|
|
|
renaming the netaddr shell to 'netaddr'
|
|
|
|
|
2009-08-12 13:32:36 +00:00
|
|
|
* Wed Aug 12 2009 John Eckersberg <jeckersb@redhat.com> - 0.7-1
|
|
|
|
- Upstream release 0.7
|
|
|
|
|
2009-07-26 20:43:28 +00:00
|
|
|
* 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
|
|
|
|
|
2009-07-22 19:32:38 +00:00
|
|
|
* 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>
|
|
|
|
|
2009-06-24 02:46:30 +00:00
|
|
|
* Tue Jun 23 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.3-1
|
|
|
|
- New upstream bugfix release
|
|
|
|
|
2009-04-13 15:19:33 +00:00
|
|
|
* Mon Apr 13 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.2-1
|
|
|
|
- New upstream bugfix release
|
|
|
|
|
2009-04-08 02:13:14 +00:00
|
|
|
* Tue Apr 7 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.1-1
|
|
|
|
- New upstream bugfix release
|
|
|
|
|
2009-02-26 22:30:37 +00:00
|
|
|
* 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
|
|
|
|
|
2009-02-18 19:38:38 +00:00
|
|
|
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-2
|
|
|
|
- Add BuildDepends on dos2unix to clean up some upstream sources
|
|
|
|
|
2009-02-18 19:30:14 +00:00
|
|
|
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-1
|
|
|
|
- New upstream version
|
|
|
|
|
2008-11-29 15:52:09 +00:00
|
|
|
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.2-2
|
|
|
|
- Rebuild for Python 2.6
|
|
|
|
|
2008-10-10 15:02:24 +00:00
|
|
|
* Fri Oct 10 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.2-1
|
|
|
|
- New upstream version, bug fixes for 0.5.1
|
|
|
|
|
2008-09-24 01:25:59 +00:00
|
|
|
* Tue Sep 23 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.1-1
|
|
|
|
- New upstream version, bug fixes for 0.5
|
|
|
|
|
2008-09-22 00:35:33 +00:00
|
|
|
* Sun Sep 21 2008 John Eckersberg <jeckersb@redhat.com> - 0.5-1
|
|
|
|
- New upstream version
|
|
|
|
|
2008-08-13 19:30:01 +00:00
|
|
|
* Mon Aug 11 2008 John Eckersberg <jeckersb@redhat.com> - 0.4-1
|
|
|
|
- Initial packaging for Fedora
|
|
|
|
|