Upstream 0.7.12

- Conditionalize python3 subpackages build on Fedora
- Few spec cleanups
This commit is contained in:
Haïkel Guémar 2014-09-17 15:08:45 +02:00
parent ccf26a8871
commit 8a9d8ff233
3 changed files with 31 additions and 21 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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@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@lists.fedoraproject.org> - 0.7.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
bca88a2395a99061e50d9ee19bc19051 netaddr-0.7.11.tar.gz
72778f2b18fee6cc01f9fb70b4de6236 netaddr-0.7.12.tar.gz