Update description

- Fix netaddr shebang (bug #1394046)
This commit is contained in:
Orion Poplawski 2016-11-13 16:50:49 -07:00
parent 6377a6ac57
commit a967f062b9

View File

@ -4,7 +4,7 @@
Name: python-netaddr
Version: 0.7.18
Release: 8%{?dist}
Release: 9%{?dist}
Summary: A pure Python network address representation and manipulation library
License: BSD
@ -18,33 +18,30 @@ BuildRequires: python-sphinx
BuildRequires: pytest
Provides: python2-netaddr = %{version}-%{release}
%global desc A network address manipulation library for Python\
\
Provides support for:\
\
Layer 3 addresses\
\
* IPv4 and IPv6 addresses, subnets, masks, prefixes\
* iterating, slicing, sorting, summarizing and classifying IP networks\
* dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)\
* set based operations (unions, intersections etc) over IP addresses and subnets\
* parsing a large variety of different formats and notations\
* looking up IANA IP block information\
* generating DNS reverse lookups\
* supernetting and subnetting\
\
Layer 2 addresses\
\
* representation and manipulation MAC addresses and EUI-64 identifiers\
* looking up IEEE organisational information (OUI, IAB)\
* generating derived IPv6 addresses
%description
A pure Python network address representation and manipulation library.
netaddr provides a Pythonic way of working with :-
- IPv4 and IPv6 addresses and subnets
- MAC addresses, OUI and IAB identifiers, IEEE EUI-64 identifiers
- arbitrary (non-aligned) IP address ranges and IP address sets
- various non-CIDR IP range formats such as nmap and glob-style formats
Included are routines for :-
- generating, sorting and summarizing IP addresses and networks
- performing easy conversions between address notations and formats
- detecting, parsing and formatting network address representations
- performing set-based operations on groups of IP addresses and subnets
- working with arbitrary IP address ranges and formats
- accessing OUI and IAB organisational information published by IEEE
- accessing IP address and block information published by IANA
For details on the latest updates and changes, see :-
http://github.com/drkjam/netaddr/blob/rel-0.7.x/CHANGELOG
API documentation for the latest release is available here :-
http://packages.python.org/netaddr/
%{desc}
%if 0%{?with_python3}
%package -n python3-netaddr
@ -55,50 +52,25 @@ BuildRequires: python3-sphinx
BuildRequires: python3-pytest
%description -n python3-netaddr
A pure Python network address representation and manipulation library.
netaddr provides a Pythonic way of working with :-
- IPv4 and IPv6 addresses and subnets
- MAC addresses, OUI and IAB identifiers, IEEE EUI-64 identifiers
- arbitrary (non-aligned) IP address ranges and IP address sets
- various non-CIDR IP range formats such as nmap and glob-style formats
Included are routines for :-
- generating, sorting and summarizing IP addresses and networks
- performing easy conversions between address notations and formats
- detecting, parsing and formatting network address representations
- performing set-based operations on groups of IP addresses and subnets
- working with arbitrary IP address ranges and formats
- accessing OUI and IAB organisational information published by IEEE
- accessing IP address and block information published by IANA
For details on the latest updates and changes, see :-
http://github.com/drkjam/netaddr/blob/rel-0.7.x/CHANGELOG
API documentation for the latest release is available here :-
http://packages.python.org/netaddr/
%{desc}
%endif
%prep
%setup -q -n netaddr-%{version}
# 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
rm -rf runtests.py
sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx
rm runtests.py
# Make rpmlint happy, rip out python shebang lines from most python
# modules
find netaddr -name "*.py" | \
xargs sed -i -e '1 {/^#!\//d}'
# Fix python executable
sed -i -e '1s,/usr/bin/env python,%{__python2} %{?py_shbang_opts},' netaddr/tools/netaddr
# Make rpmlint happy, fix permissions on documentation files
chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
%build
%py2_build
@ -132,8 +104,8 @@ LANG=en_US.UTF-8 py.test-%{python3_version}
%endif
%files
%license COPYRIGHT
%doc AUTHORS CHANGELOG INSTALL LICENSE PKG-INFO
%license COPYRIGHT LICENSE
%doc AUTHORS CHANGELOG
%doc README.md docs/html
%{python2_sitelib}/*
%{_bindir}/netaddr
@ -141,13 +113,17 @@ LANG=en_US.UTF-8 py.test-%{python3_version}
%if 0%{?with_python3}
%files -n python3-netaddr
%license COPYRIGHT
%doc AUTHORS CHANGELOG INSTALL LICENSE PKG-INFO
%doc AUTHORS CHANGELOG
%doc README.md docs/python3/html
%{python3_sitelib}/*
%{_bindir}/netaddr3
%endif
%changelog
* Sun Nov 13 2016 Orion Poplawski <orion@cora.nwra.com> - 0.7.18-9
- Update description
- Fix netaddr shebang (bug #1394046)
* Thu Nov 10 2016 Orion Poplawski <orion@cora.nwra.com> - 0.7.18-8
- Use updated python macros
- Use %%license