2011-11-29 10:17:14 +01:00
|
|
|
#
|
2011-12-12 10:04:00 +01:00
|
|
|
# spec file for package python-netifaces
|
2011-11-29 10:17:14 +01:00
|
|
|
#
|
2019-05-24 13:56:32 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-11-29 10:17:14 +01:00
|
|
|
# Copyright (c) 2011 Novell
|
|
|
|
#
|
2011-12-12 10:04:00 +01: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.
|
|
|
|
|
2019-05-24 13:56:32 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-11-29 10:17:14 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-03-30 13:34:40 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2011-11-29 10:21:43 +01:00
|
|
|
Name: python-netifaces
|
2019-05-24 13:56:32 +02:00
|
|
|
Version: 0.10.9
|
2011-11-29 10:21:43 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Portable network interface information
|
2012-06-11 14:38:36 +02:00
|
|
|
License: MIT
|
2011-11-29 10:21:43 +01:00
|
|
|
Group: Development/Languages/Python
|
2019-05-24 13:56:32 +02:00
|
|
|
Url: https://github.com/al45tair/netifaces
|
|
|
|
Source0: https://pypi.io/packages/source/n/netifaces/netifaces-%{version}.tar.gz
|
|
|
|
# https://github.com/al45tair/netifaces/issues/40
|
|
|
|
Source1: https://raw.githubusercontent.com/al45tair/netifaces/master/LICENSE
|
|
|
|
Source2: https://raw.githubusercontent.com/al45tair/netifaces/master/test.py
|
2017-03-30 13:34:40 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: python-rpm-macros
|
2011-11-29 10:21:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-03-30 13:34:40 +02:00
|
|
|
|
|
|
|
%python_subpackages
|
2011-11-29 10:17:14 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
netifaces provides a (hopefully portable-ish) way for Python programmers to
|
|
|
|
get access to a list of the network interfaces on the local machine, and to
|
|
|
|
obtain the addresses of those network interfaces.
|
|
|
|
|
|
|
|
The package has been tested on Mac OS X, Windows XP, Windows Vista, Linux and
|
|
|
|
Solaris. On Windows, it is currently not able to retrieve IPv6 addresses,
|
|
|
|
owing to shortcomings of the Windows API.
|
|
|
|
|
2011-11-29 10:21:43 +01:00
|
|
|
It should work on other UNIX-like systems provided they implement either
|
2011-11-29 10:17:14 +01:00
|
|
|
getifaddrs() or support the SIOCGIFxxx socket options, although the data
|
|
|
|
provided by the socket options is normally less complete.
|
|
|
|
|
|
|
|
%prep
|
2011-11-29 10:21:43 +01:00
|
|
|
%setup -q -n netifaces-%{version}
|
2019-05-24 13:56:32 +02:00
|
|
|
cp %{SOURCE1} %{SOURCE2} .
|
2011-11-29 10:17:14 +01:00
|
|
|
|
|
|
|
%build
|
2017-03-30 13:34:40 +02:00
|
|
|
%python_build
|
2011-11-29 10:17:14 +01:00
|
|
|
|
|
|
|
%install
|
2017-03-30 13:34:40 +02:00
|
|
|
%python_install
|
2011-11-29 10:17:14 +01:00
|
|
|
|
2019-05-24 13:56:32 +02:00
|
|
|
%check
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python test.py | grep 'Interface lo'
|
|
|
|
|
2017-03-30 13:34:40 +02:00
|
|
|
%files %{python_files}
|
2011-11-29 10:17:14 +01:00
|
|
|
%defattr(-,root,root,-)
|
2019-05-24 13:56:32 +02:00
|
|
|
%license LICENSE
|
2014-05-19 14:04:49 +02:00
|
|
|
%doc README.rst
|
2011-11-29 10:21:43 +01:00
|
|
|
%{python_sitearch}/*
|
2011-11-29 10:17:14 +01:00
|
|
|
|
|
|
|
%changelog
|