[python-netaddr] Upstream 0.7.12

Haïkel Guémar hguemar at fedoraproject.org
Wed Sep 17 13:09:00 UTC 2014


commit 8a9d8ff23337e21df78ed3d1fc1ee35bb568cfda
Author: Haïkel Guémar <hguemar at fedoraproject.org>
Date:   Wed Sep 17 15:08:45 2014 +0200

    Upstream 0.7.12
    
    - Conditionalize python3 subpackages build on Fedora
    - Few spec cleanups

 .gitignore          |    1 +
 python-netaddr.spec |   49 +++++++++++++++++++++++++++++--------------------
 sources             |    2 +-
 3 files changed, 31 insertions(+), 21 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 49433e0..b54160a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 netaddr-0.7.4.tar.gz
 /netaddr-0.7.5.tar.gz
 /netaddr-0.7.11.tar.gz
+/netaddr-0.7.12.tar.gz
diff --git a/python-netaddr.spec b/python-netaddr.spec
index 74d2e6b..dedae33 100644
--- a/python-netaddr.spec
+++ b/python-netaddr.spec
@@ -1,22 +1,20 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
 Name:           python-netaddr
-Version:        0.7.11
-Release:        3%{?dist}
+Version:        0.7.12
+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:        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
+BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
 BuildRequires:  python-sphinx
-BuildRequires:  python3-devel
-BuildRequires:  python3-setuptools
-BuildRequires:  python3-sphinx
-
 
 %description
 A pure Python network address representation and manipulation library.
@@ -46,10 +44,12 @@ API documentation for the latest release is available here :-
 
     http://packages.python.org/netaddr/
 
-
+%if 0%{?with_python3}
 %package -n python3-netaddr
 Summary: A pure Python network address representation and manipulation library
-Group: Development/Libraries
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-sphinx
 
 %description -n python3-netaddr
 A pure Python network address representation and manipulation library.
@@ -78,7 +78,7 @@ For details on the latest updates and changes, see :-
 API documentation for the latest release is available here :-
 
     http://packages.python.org/netaddr/
-
+%endif
 
 %prep
 %setup -q -n netaddr-%{version}
@@ -96,57 +96,66 @@ find netaddr -name "*.py" | \
 # Make rpmlint happy, fix permissions on documentation files
 chmod 0644 README AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
 
+%if 0%{?with_python3}
 rm -rf %{py3dir}
 cp -a . %{py3dir}
+%endif
 
 %build
 %{__python2} setup.py build
 
+%if 0%{?with_python3}
 pushd %{py3dir}
 %{__python3} setup.py build
 popd
+%endif
 
 #docs
 pushd docs
 PYTHONPATH='../' sphinx-build -b html -d build/doctrees source html
+%if 0%{?with_python3}
 PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html
+%endif
 popd
 
 
 %install
-rm -rf %{buildroot}
-
+%if 0%{?with_python3}
 pushd %{py3dir}
 %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
 mv %{buildroot}%{_bindir}/netaddr %{buildroot}%{_bindir}/netaddr3
 popd
+%endif
 
 %{__python2} setup.py install -O1 --skip-build --root %{buildroot}
 
 
 %check
 %{__python2} netaddr/tests/__init__.py
+%if 0%{?with_python3}
 LANG=en_US.UTF-8 %{__python3} netaddr/tests/__init__.py
-
-%clean
-rm -rf %{buildroot}
-
+%endif
 
 %files
-%defattr(-,root,root,-)
 %doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
 %doc README docs/html
 %{python_sitelib}/*
 %{_bindir}/netaddr
 
+%if 0%{?with_python3}
 %files -n python3-netaddr
-%defattr(-,root,root,-)
 %doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
 %doc README docs/python3/html
 %{python3_sitelib}/*
 %{_bindir}/netaddr3
+%endif
 
 %changelog
+* Wed Sep 17 2014 Haïkel Guémar <hguemar at fedoraproject.org> - 0.7.12-1
+- Upstream 0.7.12
+- Conditionalize python3 subpackages build on Fedora
+- Few spec cleanups
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.11-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index d036a16..a40980a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bca88a2395a99061e50d9ee19bc19051  netaddr-0.7.11.tar.gz
+72778f2b18fee6cc01f9fb70b4de6236  netaddr-0.7.12.tar.gz


More information about the scm-commits mailing list