14
0

Accepting request 516767 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/516767
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netaddr?expand=0&rev=21
This commit is contained in:
2017-08-24 16:52:15 +00:00
committed by Git OBS Bridge
2 changed files with 27 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Aug 6 09:31:51 UTC 2017 - mardnh@gmx.de
- Convert to singlespec
-------------------------------------------------------------------
Sat Jan 14 14:15:17 UTC 2017 - michael@stroeder.com

View File

@@ -16,24 +16,22 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
#%%bcond_without test
Name: python-netaddr
Version: 0.7.19
Release: 0
Url: http://github.com/drkjam/netaddr
Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses
License: BSD-3-Clause
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/n/netaddr/netaddr-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
Url: http://github.com/drkjam/netaddr
Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%python_subpackages
%description
A pure Python network address representation and manipulation library.
@@ -57,15 +55,22 @@ Included are routines for:
sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable scripts
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_clone %{buildroot}%{_bindir}/netaddr
%fdupes %{buildroot}
%files
%defattr(-,root,root,-)
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%{python_sitelib}/*
%{_bindir}/netaddr
%{_bindir}/netaddr-%{python_bin_suffix}
%python3_only %{_bindir}/netaddr
%doc AUTHORS CHANGELOG COPYRIGHT README.md LICENSE
%changelog