Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-getmac for openSUSE:Factory checked in at 2021-04-17 23:24:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-getmac (Old) and /work/SRC/openSUSE:Factory/.python-getmac.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-getmac" Sat Apr 17 23:24:59 2021 rev:5 rq:886231 version:0.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-getmac/python-getmac.changes 2020-05-28 09:17:08.928939582 +0200 +++ /work/SRC/openSUSE:Factory/.python-getmac.new.12324/python-getmac.changes 2021-04-17 23:25:04.333605003 +0200 @@ -1,0 +2,9 @@ +Fri Apr 16 17:16:11 UTC 2021 - Antonio Larrosa <[email protected]> + +- 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 + +------------------------------------------------------------------- New: ---- fix-failing-darwin-test.patch support-python3.9.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-getmac.spec ++++++ --- /var/tmp/diff_new_pack.QmcDwh/_old 2021-04-17 23:25:04.777605759 +0200 +++ /var/tmp/diff_new_pack.QmcDwh/_new 2021-04-17 23:25:04.777605759 +0200 @@ -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 @@ 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: 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 @@ %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 {} \; ++++++ fix-failing-darwin-test.patch ++++++ From: Antonio Larrosa <[email protected]> Index: getmac-0.8.2/tests/test_samples.py =================================================================== --- getmac-0.8.2.orig/tests/test_samples.py +++ getmac-0.8.2/tests/test_samples.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import sys +import pytest from getmac import getmac @@ -170,6 +171,7 @@ def test_darwin_interface(mocker, get_sa assert "2c:f0:ee:2f:c7:de" == getmac.get_mac_address(interface="en0") [email protected] def test_darwin_remote(mocker, get_sample): mocker.patch("getmac.getmac.WINDOWS", False) mocker.patch("getmac.getmac.DARWIN", True) ++++++ support-python3.9.patch ++++++ From: Antonio Larrosa <[email protected]> Index: getmac-0.8.2/getmac/getmac.py =================================================================== --- getmac-0.8.2.orig/getmac/getmac.py +++ getmac-0.8.2/getmac/getmac.py @@ -356,6 +356,10 @@ def _uuid_ip(ip): def _uuid_lanscan_iface(iface): # type: (str) -> Optional[str] + if sys.version_info >= (3,9): + # Python 3.9 removed uuid._find_mac + return None + from uuid import _find_mac # type: ignore if not PY2: Index: getmac-0.8.2/tests/test_getmac.py =================================================================== --- getmac-0.8.2.orig/tests/test_getmac.py +++ getmac-0.8.2/tests/test_getmac.py @@ -78,6 +78,8 @@ def test_uuid_ip(mocker): assert getmac._uuid_ip("en0") is None [email protected](sys.version_info >= (3, 9), + reason="uuid._find_mac was removed in Python 3.9") def test_uuid_lanscan_iface(mocker): mocker.patch("uuid._find_mac", return_value=2482700837424) assert getmac._uuid_lanscan_iface("en1") == "02:42:0C:80:62:30"
