[packages/python-netaddr] Version: 0.7.14, sphinx-generated docs
jajcus
jajcus at pld-linux.org
Tue Jun 16 10:31:04 CEST 2015
commit 0b29eab980be7cef79ac727d7987756fad46700a
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Tue Jun 16 10:30:44 2015 +0200
Version: 0.7.14, sphinx-generated docs
issue-2.patch | 65 -----------------------------------------------------
python-netaddr.spec | 32 ++++++++++++++++----------
2 files changed, 20 insertions(+), 77 deletions(-)
---
diff --git a/python-netaddr.spec b/python-netaddr.spec
index 8d1b2a8..edbaa85 100644
--- a/python-netaddr.spec
+++ b/python-netaddr.spec
@@ -1,21 +1,22 @@
#
# Conditional build:
+%bcond_without apidocs # sphinx based documentation
%bcond_without python3 # do not build python3 modules
%define module netaddr
Summary: A pure Python network address representation and manipulation library
Name: python-netaddr
-Version: 0.7.5
-Release: 5
+Version: 0.7.14
+Release: 1
License: BSD
Group: Development/Languages/Python
-Source0: https://github.com/downloads/drkjam/netaddr/netaddr-%{version}.tar.gz
-# Source0-md5: 06168e1efb753d4d3e48778a5373e192
-Patch0: issue-2.patch
+Source0: https://pypi.python.org/packages/source/n/netaddr/%{module}-%{version}.tar.gz
+# Source0-md5: 1ba9d1e887c838f190774cf6b74c109d
URL: https://github.com/drkjam/netaddr/
BuildRequires: python-modules
%{?with_python3:BuildRequires: python3-modules}
BuildRequires: rpm-pythonprov
+%{?with_apidocs:BuildRequires: sphinx-pdg}
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -73,7 +74,6 @@ Interactive shell for the python-netaddr library.
%prep
%setup -q -n %{module}-%{version}
-%patch0 -p1
%build
%{__python} setup.py build
@@ -92,6 +92,10 @@ rm -rf $RPM_BUILD_ROOT
%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
%py_postclean
+%if %{with apidocs}
+sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs/source build/html
+%endif
+
%if %{with python3}
%{__python3} setup.py install \
--optimize 2 \
@@ -105,7 +109,10 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc docs/api AUTHORS CHANGELOG README THANKS
+%doc AUTHORS CHANGELOG README THANKS
+%if %{with apidocs}
+%doc build/html
+%endif
%{py_sitescriptdir}/*.egg-info
%dir %{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}/*.py[co]
@@ -115,8 +122,7 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitescriptdir}/%{module}/eui/*.txt
%dir %{py_sitescriptdir}/%{module}/ip
%{py_sitescriptdir}/%{module}/ip/*.py[co]
-%{py_sitescriptdir}/%{module}/ip/*-space
-%{py_sitescriptdir}/%{module}/ip/*-addresses
+%{py_sitescriptdir}/%{module}/ip/*.xml
%dir %{py_sitescriptdir}/%{module}/strategy
%{py_sitescriptdir}/%{module}/strategy/*.py[co]
%dir %{py_sitescriptdir}/%{module}/tests
@@ -129,7 +135,10 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%files -n python3-netaddr
%defattr(644,root,root,755)
-%doc docs/api AUTHORS CHANGELOG README THANKS
+%doc AUTHORS CHANGELOG README THANKS
+%if %{with apidocs}
+%doc build/html
+%endif
%{py3_sitescriptdir}/*.egg-info
%dir %{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}/*.py
@@ -142,8 +151,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{py3_sitescriptdir}/%{module}/ip
%{py3_sitescriptdir}/%{module}/ip/*.py
%{py3_sitescriptdir}/%{module}/ip/__pycache__
-%{py3_sitescriptdir}/%{module}/ip/*-space
-%{py3_sitescriptdir}/%{module}/ip/*-addresses
+%{py3_sitescriptdir}/%{module}/ip/*.xml
%dir %{py3_sitescriptdir}/%{module}/strategy
%{py3_sitescriptdir}/%{module}/strategy/*.py
%{py3_sitescriptdir}/%{module}/strategy/__pycache__
diff --git a/issue-2.patch b/issue-2.patch
deleted file mode 100644
index 28d4d61..0000000
--- a/issue-2.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 80071f4450261b70b70f537bc2b54d2c97d9f562 Mon Sep 17 00:00:00 2001
-From: "David P. D. Moss" <drkjam at gmail.com>
-Date: Thu, 25 Nov 2010 08:53:49 +0000
-Subject: [PATCH] Fixed github Issue no. 2. Thanks keesbos.
-
----
- netaddr/ip/__init__.py | 2 ++
- netaddr/tests/2.x/ip/constructor.txt | 11 +++++++++++
- netaddr/tests/3.x/ip/constructor.txt | 11 +++++++++++
- 3 files changed, 24 insertions(+), 0 deletions(-)
-
-diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py
-index 0179c38..e4a6b7b 100644
---- a/netaddr/ip/__init__.py
-+++ b/netaddr/ip/__init__.py
-@@ -779,6 +779,8 @@ def parse_ip_network(module, addr, implicit_prefix=False, flags=0):
- # Try a partial IPv4 network address...
- expanded_addr = _ipv4.expand_partial_address(val1)
- ip = IPAddress(expanded_addr, module.version, flags=INET_PTON)
-+ else:
-+ raise AddrFormatError('invalid IPNetwork address %s!' % addr)
- value = ip._value
-
- try:
-diff --git a/netaddr/tests/2.x/ip/constructor.txt b/netaddr/tests/2.x/ip/constructor.txt
-index f67f5e4..5a9e978 100644
---- a/netaddr/tests/2.x/ip/constructor.txt
-+++ b/netaddr/tests/2.x/ip/constructor.txt
-@@ -209,3 +209,14 @@ IPNetwork('172.24.0.0/16')
-
-
- }}}
-+
-+Negative testing
-+
-+{{{
-+
-+>>> IPNetwork('foo')
-+Traceback (most recent call last):
-+...
-+AddrFormatError: invalid IPNetwork foo
-+
-+}}}
-diff --git a/netaddr/tests/3.x/ip/constructor.txt b/netaddr/tests/3.x/ip/constructor.txt
-index 2ec47c0..35a5cd6 100644
---- a/netaddr/tests/3.x/ip/constructor.txt
-+++ b/netaddr/tests/3.x/ip/constructor.txt
-@@ -209,3 +209,14 @@ IPNetwork('172.24.0.0/16')
-
-
- }}}
-+
-+Negative testing
-+
-+{{{
-+
-+>>> IPNetwork('foo')
-+Traceback (most recent call last):
-+...
-+netaddr.core.AddrFormatError: invalid IPNetwork foo
-+
-+}}}
---
-1.7.5.2
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-netaddr.git/commitdiff/0b29eab980be7cef79ac727d7987756fad46700a
More information about the pld-cvs-commit
mailing list