summaryrefslogtreecommitdiff
path: root/dev-python/python-ethtool
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/python-ethtool
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/python-ethtool')
-rw-r--r--dev-python/python-ethtool/Manifest1
-rw-r--r--dev-python/python-ethtool/files/test-skip-wg-dev.patch29
-rw-r--r--dev-python/python-ethtool/metadata.xml14
-rw-r--r--dev-python/python-ethtool/python-ethtool-0.14.ebuild29
4 files changed, 73 insertions, 0 deletions
diff --git a/dev-python/python-ethtool/Manifest b/dev-python/python-ethtool/Manifest
new file mode 100644
index 000000000000..d42a9219ab7b
--- /dev/null
+++ b/dev-python/python-ethtool/Manifest
@@ -0,0 +1 @@
+DIST python-ethtool-0.14.tar.gz 41945 BLAKE2B d83e40e79481ee5f91f7e097dc4f6f0eb541f88ba83e13c13b3129ece2196ee999f9110310339ebbc2343b814a3b2c80405a3b4ce6931110509a54281b370cd8 SHA512 57a3f2d60dd8309192fc858614645d4e7533c90c03113ffc1eeeb810b86eb71b0a80b4eb209d3452c7624c5318a853de50d9d716d41334bf079e6e3e2490fd4b
diff --git a/dev-python/python-ethtool/files/test-skip-wg-dev.patch b/dev-python/python-ethtool/files/test-skip-wg-dev.patch
new file mode 100644
index 000000000000..435a81ae494d
--- /dev/null
+++ b/dev-python/python-ethtool/files/test-skip-wg-dev.patch
@@ -0,0 +1,29 @@
+From aa18c4a046ed2b508a87161f886e07c6d3716dd3 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sat, 2 Feb 2019 14:00:52 -0800
+Subject: [PATCH] tests/test_ethtool.py: skip test_get_active_devices for wg
+
+wg is a wireguard interface and this test fails with
+OSError: [Errno 95] Operation not supported
+---
+ tests/test_ethtool.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_ethtool.py b/tests/test_ethtool.py
+index 6162cd3..0ff78b1 100755
+--- a/tests/test_ethtool.py
++++ b/tests/test_ethtool.py
+@@ -254,8 +254,8 @@ class EthtoolTests(unittest.TestCase):
+
+ def test_get_active_devices(self):
+ for devname in ethtool.get_active_devices():
+- # Skip these test on tun devices
+- if devname.startswith('tun'):
++ # Skip these test on tun and wg devices
++ if devname.startswith('tun') or devname.startswith('wg'):
+ continue
+ self._functions_accepting_devnames(devname)
+
+--
+2.20.1
+
diff --git a/dev-python/python-ethtool/metadata.xml b/dev-python/python-ethtool/metadata.xml
new file mode 100644
index 000000000000..75b05d8bd293
--- /dev/null
+++ b/dev-python/python-ethtool/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ Python bindings for the ethtool kernel interface, that allows querying and
+ changing of Ethernet card settings, such as speed, port, auto-negotiation, and
+ PCI locations.
+ </longdescription>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/python-ethtool/python-ethtool-0.14.ebuild b/dev-python/python-ethtool/python-ethtool-0.14.ebuild
new file mode 100644
index 000000000000..64886a510607
--- /dev/null
+++ b/dev-python/python-ethtool/python-ethtool-0.14.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+# TODO: install scripts and their man pages
+
+inherit distutils-r1
+
+DESCRIPTION="Ethernet settings python bindings"
+HOMEPAGE="https://pypi.org/project/ethtool/
+ https://github.com/fedora-python/python-ethtool"
+SRC_URI="https://github.com/fedora-python/python-ethtool/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="dev-libs/libnl:3"
+RDEPEND="${DEPEND}"
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=( "${FILESDIR}"/test-skip-wg-dev.patch )
+
+python_test() {
+ esetup.py test || die "Tests failed with ${EPYTHON}"
+}