2011-09-22 10:33:58 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-ipaddr
|
|
|
|
#
|
2018-12-04 14:34:41 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-09-22 10:33:58 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-12-12 10:02:38 +01:00
|
|
|
|
2018-12-04 14:34:41 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-22 10:33:58 +02:00
|
|
|
#
|
|
|
|
|
2011-12-12 10:02:38 +01:00
|
|
|
|
2017-08-31 18:57:14 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2011-07-18 19:46:56 +02:00
|
|
|
Name: python-ipaddr
|
2015-03-25 17:46:25 +01:00
|
|
|
Version: 2.1.11
|
2011-09-22 10:33:58 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Google's IP address manipulation library
|
2011-12-06 18:56:07 +01:00
|
|
|
License: Apache-2.0
|
2011-09-22 10:33:58 +02:00
|
|
|
Group: Development/Languages/Python
|
2017-08-31 18:57:14 +02:00
|
|
|
Url: http://code.google.com/p/ipaddr-py/
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/i/ipaddr/ipaddr-%{version}.tar.gz
|
|
|
|
# PATCH-FIX-OPENSUSE - use_2to3.patch - use 2to3 to build python3 packages
|
|
|
|
Patch0: use_2to3.patch
|
|
|
|
BuildRequires: %{python_module pkginfo}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 14:34:41 +01:00
|
|
|
BuildRequires: python3-2to3
|
2011-09-22 10:33:58 +02:00
|
|
|
BuildArch: noarch
|
2017-08-31 18:57:14 +02:00
|
|
|
|
|
|
|
%python_subpackages
|
2011-07-18 19:46:56 +02:00
|
|
|
|
|
|
|
%description
|
2011-09-22 10:33:58 +02:00
|
|
|
Google's IP address manipulation library. An IPv4/IPv6 manipulation library
|
|
|
|
in Python. This library is used to create/poke/manipulate IPv4 and IPv6
|
|
|
|
addresses and prefixes.
|
2011-07-18 19:46:56 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n ipaddr-%{version}
|
2017-08-31 18:57:14 +02:00
|
|
|
%patch0 -p1
|
2011-09-22 10:33:58 +02:00
|
|
|
sed -i "1d" ipaddr.py # Fix non-executable script
|
2011-07-18 19:46:56 +02:00
|
|
|
|
|
|
|
%build
|
2017-08-31 18:57:14 +02:00
|
|
|
%python_build
|
2011-07-18 19:46:56 +02:00
|
|
|
|
|
|
|
%install
|
2017-08-31 18:57:14 +02:00
|
|
|
%python_install
|
2011-09-22 10:33:58 +02:00
|
|
|
|
|
|
|
%check
|
2017-08-31 18:57:14 +02:00
|
|
|
mkdir tester
|
|
|
|
pushd tester
|
|
|
|
%python_expand cp ../ipaddr_test.py ipaddr_test-%{$python_bin_suffix}.py
|
|
|
|
|
|
|
|
if [ -e ipaddr_test-%{python3_bin_suffix}.py ] ; then
|
|
|
|
2to3 -wn ipaddr_test-%{python3_bin_suffix}.py
|
|
|
|
fi
|
|
|
|
|
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
|
|
|
$python -B ipaddr_test-%{$python_bin_suffix}.py
|
|
|
|
}
|
|
|
|
popd
|
2011-07-18 19:46:56 +02:00
|
|
|
|
2017-08-31 18:57:14 +02:00
|
|
|
%files %{python_files}
|
2011-09-22 10:33:58 +02:00
|
|
|
%defattr(-,root,root,-)
|
2017-08-31 18:57:14 +02:00
|
|
|
%doc COPYING README RELEASENOTES
|
2011-09-22 10:33:58 +02:00
|
|
|
%{python_sitelib}/*
|
2011-07-18 19:46:56 +02:00
|
|
|
|
|
|
|
%changelog
|