15
0
forked from pool/python-getmac

Accepting request 886090 from home:alarrosa:branches:devel:languages:python

- Add patch to fix build by skipping a test that doesn't work as
  expected:
  * fix-failing-darwin-test.patch
- Add patch to fix build with python 3.9:
  * support-python3.9.patch

OBS-URL: https://build.opensuse.org/request/show/886090
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-getmac?expand=0&rev=12
This commit is contained in:
2021-04-17 08:37:51 +00:00
committed by Git OBS Bridge
parent ece83ddcc7
commit 10a1047105
4 changed files with 69 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-getmac
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,10 @@ 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}
@@ -33,7 +37,7 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
@@ -42,6 +46,8 @@ 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 {} \;