1
0
forked from pool/python-getmac
Files
python-getmac/python-getmac.spec
Markéta Machová 25be958423 Accepting request 1006777 from home:yarunachalam:branches:devel:languages:python
- 0.8.3 (12/10/2021)
  Announcement: Compatibility with Python versions older than 3.6 (2.7, 3.4, and 3.5) is deprecated and will be removed in getmac 1.0.0.
  If you are stuck on an unsupported Python, considor loosely pinning the version of this package in your dependency list, e.g. getmac<1.
  Changed
  Added support for Thomas Habets' version of arping in addition to the existing iputils one (contributed by Ville Skyttä (@scop) in #52 and #54)
  Added support for docker in network bridge mode (contributed by Tomasz Duda (@tomaszduda23) in #57)
  Add CHANGELOG URL to PyPI metadata (contributed by Ville Skyttä (@scop) in #58)
  Fixed code quality test suite errors (includes changes by Daniel Flanagan (@FlantasticDan) in #67)
  Improved Android support (contributed by @emadmahdi in #71)
  Minor code quality fixes (2 years of neglecting master branch)
  Add Code of Conduct for project contributors
  Add SECURITY.md for reporting security issues (e.g. vulnerabilities)
  Deprecate Python 3.4 and 3.5
  Issue deprecation message as a warning in addition to a log message

OBS-URL: https://build.opensuse.org/request/show/1006777
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-getmac?expand=0&rev=14
2022-09-29 09:37:03 +00:00

84 lines
2.6 KiB
RPMSpec

#
# spec file for package python-getmac
#
# Copyright (c) 2022 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-getmac
Version: 0.8.3
Release: 0
Summary: Module to get MAC addresses of remote hosts and local interfaces
License: MIT
Group: Development/Languages/Python
URL: https://github.com/GhostofGoes/getmac
Source: https://files.pythonhosted.org/packages/source/g/getmac/getmac-%{version}.tar.gz
# PATCH-FIX-OPENSUSE
Patch0: fix-failing-darwin-test.patch
# PATCH-FIX-UPSTREAM
Patch1: support-python3.9.patch
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
A Python module to get MAC addresses of remote hosts and local interfaces.
%prep
%setup -q -n getmac-%{version}
%patch0 -p1
%patch1 -p1
sed -i "1,4{/\/usr\/bin\/env/d}" getmac/__main__.py
rm -r *egg-info
find . -type f -exec chmod -x {} \;
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_mandir}/man1/getmac.1
%python_clone -a %{buildroot}%{_bindir}/getmac
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=C.UTF-8
# test_cli_main fails in OBS not local run
# test_cli_multiple_debug_levels same as above
%pytest tests -k 'not test_get_default_iface_freebsd and not test_cli_main and not test_cli_multiple_debug_levels'
%post
%python_install_alternative getmac getmac.1
%postun
%python_uninstall_alternative getmac
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE
%python_alternative %{_bindir}/getmac
%python_alternative %{_mandir}/man1/getmac.1%{?ext_man}
%{python_sitelib}/getmac*
%changelog