[python-netaddr] New upstream release 0.7.11, Enabled Python 3 support (bz1070357)
John Eckersberg
jeckersb at fedoraproject.org
Mon Apr 21 20:54:56 UTC 2014
commit 58f43eb16b2813c9126573ebee7e3f956db1d8c4
Author: John Eckersberg <jeckersb at redhat.com>
Date: Mon Apr 21 16:54:11 2014 -0400
New upstream release 0.7.11, Enabled Python 3 support (bz1070357)
.gitignore | 1 +
python-netaddr.spec | 90 +++++++++++++++++++++++++++++++++++++++++++--------
sources | 2 +-
3 files changed, 78 insertions(+), 15 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0578880..49433e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
netaddr-0.7.4.tar.gz
/netaddr-0.7.5.tar.gz
+/netaddr-0.7.11.tar.gz
diff --git a/python-netaddr.spec b/python-netaddr.spec
index 92e448d..6b02d90 100644
--- a/python-netaddr.spec
+++ b/python-netaddr.spec
@@ -1,22 +1,21 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
-#====================================================================#
-
Name: python-netaddr
-Version: 0.7.5
-Release: 7%{?dist}
+Version: 0.7.11
+Release: 1%{?dist}
Summary: A pure Python network address representation and manipulation library
Group: Development/Libraries
License: BSD
URL: http://github.com/drkjam/netaddr
-Source0: http://github.com/downloads/drkjam/netaddr/netaddr-%{version}.tar.gz
+Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel >= 2.4
-
-Patch0: 0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch
+BuildRequires: python-setuptools
+BuildRequires: python-sphinx
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-sphinx
%description
@@ -48,9 +47,41 @@ API documentation for the latest release is available here :-
http://packages.python.org/netaddr/
+%package -n python3-netaddr
+Summary: A pure Python network address representation and manipulation library
+Group: Development/Libraries
+
+%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/
+
+
%prep
%setup -q -n netaddr-%{version}
-%patch0 -p1 -b .invalid_ip_network
# Make rpmlint happy, get rid of DOS line endings
%{__sed} -i 's/\r//' netaddr/*.py
@@ -65,17 +96,37 @@ find netaddr -name "*.py" | \
# Make rpmlint happy, fix permissions on documentation files
chmod 0644 README AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
%build
-%{__python} setup.py build
+%{__python2} setup.py build
+
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+
+#docs
+pushd docs
+PYTHONPATH='../' sphinx-build -b html -d build/doctrees source html
+PYTHONPATH='../' sphinx-build-3.3 -b html -d build/doctrees source python3/html
+popd
%install
rm -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+mv %{buildroot}%{_bindir}/netaddr %{buildroot}%{_bindir}/netaddr3
+popd
+
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%check
-%{__python} netaddr/tests/__init__.py
+%{__python2} netaddr/tests/__init__.py
+LANG=en_US.UTF-8 %{__python3} netaddr/tests/__init__.py
%clean
rm -rf %{buildroot}
@@ -84,11 +135,22 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
-%doc README docs/api/
+%doc README docs/html
%{python_sitelib}/*
%{_bindir}/netaddr
+%files -n python3-netaddr
+%defattr(-,root,root,-)
+%doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
+%doc README docs/python3/html
+%{python3_sitelib}/*
+%{_bindir}/netaddr3
+
%changelog
+* Mon Apr 21 2014 John Eckersberg <jeckersb at redhat.com> - 0.7.11-1
+- New upstream release 0.7.11
+- Enabled Python 3 support (bz1070357)
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 6c81f83..d036a16 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-06168e1efb753d4d3e48778a5373e192 netaddr-0.7.5.tar.gz
+bca88a2395a99061e50d9ee19bc19051 netaddr-0.7.11.tar.gz
More information about the scm-commits
mailing list