summaryrefslogtreecommitdiff
path: root/dev-python/dbusmock
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/dbusmock
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/dbusmock')
-rw-r--r--dev-python/dbusmock/Manifest8
-rw-r--r--dev-python/dbusmock/dbusmock-0.16.7.ebuild45
-rw-r--r--dev-python/dbusmock/dbusmock-0.16.9.ebuild46
-rw-r--r--dev-python/dbusmock/files/0.16.7-disable-pyflakes-test.patch20
-rw-r--r--dev-python/dbusmock/files/0.16.9-disable-style-tests.patch14
-rw-r--r--dev-python/dbusmock/files/0.16.9-replace-dbus-launch.patch76
-rw-r--r--dev-python/dbusmock/metadata.xml8
7 files changed, 217 insertions, 0 deletions
diff --git a/dev-python/dbusmock/Manifest b/dev-python/dbusmock/Manifest
new file mode 100644
index 000000000000..139d6e51bcc4
--- /dev/null
+++ b/dev-python/dbusmock/Manifest
@@ -0,0 +1,8 @@
+AUX 0.16.7-disable-pyflakes-test.patch 676 SHA256 40152b44aa335bf06dd5571288d955b0756f9a873d190cd7461a61b812c68bc2 SHA512 c3990b256754277d2c0c3c313284f3b41cf39df039cafc6e6b1b99b22d1594fe2851e7f98dc2b93179175981d4fde653dcc85acabdc076dd71994e0277231924 WHIRLPOOL f947a40e3f7931f0aca5b105685e7419c12ffb013b89943a9859d1d075115332c8a93f1a9a622a2d8ae30cda1d386646d0d08dfa662f6d9e726eb1d2704fbc91
+AUX 0.16.9-disable-style-tests.patch 502 SHA256 0cca8f2b3c74bf86cec2584bfd23c4a5df50e893dd976d81639856c597bc0f34 SHA512 1d9f957a74b767db9355380437233167e1c2e6957dd993843ad7eaac3f0cfb9fad739b9238207d60db203bf6daed6f1b5ce9373ef1a4085431845e8f8f9b6147 WHIRLPOOL 771dcca1f55eba0ba6a813de09dbd1af43ebbbabc821ac02ba5079f1668afc9aa91964a3485965febfcbfcb872e4def4fe7a3d58b87b5584bbaa778d4de5192d
+AUX 0.16.9-replace-dbus-launch.patch 2851 SHA256 80c05e59f38c1e64ca8eadf955e828810530f4bc459175e2dc2c731429e98b24 SHA512 43fc52f453b086b59f854677eafda955ddd1e6a448579ac60de7288f6f1c8e8e029f5af12486ef6c14ba01f41fd10785c7bb076dcf4968349811be47c0b56073 WHIRLPOOL c14432074503bcfe4ebdbb40e316082fbfcf2b56a598efb797477316f51fef862e2e3174c6d7f23798e384f4d57f5137e8de5174d8fe5a25224bb4d0e6c98529
+DIST dbusmock-0.16.7.tar.gz 70544 SHA256 2d2ea892fa4633c3ec6ac1e912120ec493047a5c6522849b7d1c95ad755bce75 SHA512 749728b966b1e067a0a8bd61ee64c1c7ff22751ccb48e15096d041e78c6e779d787160ee191e90daa3177b92c0ee45c66af74b2dd4e4bcb570892b431ec13467 WHIRLPOOL 921c47fb0b86a6a3368c3b37c27f30b75edacefb46f1a726e39f35eb7b1ea7d0f78c3a7e04b218016c558578625ff28188bfece7cbc7aa06405effe4ab614f92
+DIST dbusmock-0.16.9.tar.gz 71014 SHA256 892b770a7f6c800fd6c0a9d102ef085a9371cc4eaed95dabbd740913dc08dd9b SHA512 3aa91f6ede054ed3d3a69f68f3886094e881d266a8f09c7d08a34d10b080a77facde8aae01e75232472c2e643574fe897dae2c3588f5ad9ecf4ec4e67f404f54 WHIRLPOOL 192d522a79b365630d0ef2069b5cf1cdae3ddb7896ad9db590ff8e7a180d44ac101ed123c035c272c27cc96cb33bbed1a9e00bf08ab0e248554f3ed374ead1ee
+EBUILD dbusmock-0.16.7.ebuild 1009 SHA256 694161f210f88d97065cafe4119ee96e611fa27b1589e43e01f216a4341fca48 SHA512 2ea59870f377a3c5f0c4cd126ead42275356a576f88e7512ba045dc2258fb37d22bb0df8dd0be0f7d62316e919c31661cde9406a1df56d30b2d43ee8771f90ae WHIRLPOOL e550396b2b4440c9dfa0c444732a46f79a9034e59e48d56e3d8ac522f7ad23489185608f6a3a8b61dfcafff4eb1b0d65a76f0209d3cfe1e8ebd0e3160a829a08
+EBUILD dbusmock-0.16.9.ebuild 1061 SHA256 b81584c0d5fe107868364a4ce3801f8291135400d21c9e6ea12a0f7a4cc421e8 SHA512 d1c9bdebfabd11e0db1f7dbf7f9a477c90b53737f1a147e43916b01e286e3b302c8f0d127b98fc5f90dce5caeaff90cc479b60b891886c735965b88150e91d43 WHIRLPOOL 3b3801d8fc7066f3ad76a0b00bbed2e037ba6189867277aa437ec03107c050f2ca8855dd2021edf8f6e1b23383cd7a3f2080c85e60a2c683f003d5f9acf3dce0
+MISC metadata.xml 253 SHA256 8f92439176f4cd2ba6a060c523c6b29ab210cd9aab7903b6db6eecc6654b1e21 SHA512 8d59f413993268ca783f7407b676900bb2d964754bf705d4175e2bafbe058a52af74f3928e4bd84d292518f8cf13fab7051486ab7cdc61d02fae6e0188d44442 WHIRLPOOL d5d853bd8a39a54c45728e16a1aa295e014e0a3a105a01ec6b3c93a4f53d7b7055644708301751b7f5be68543056d3f0bd611d5ce0be442eb5d06f5e032fe154
diff --git a/dev-python/dbusmock/dbusmock-0.16.7.ebuild b/dev-python/dbusmock/dbusmock-0.16.7.ebuild
new file mode 100644
index 000000000000..dbb59680d73a
--- /dev/null
+++ b/dev-python/dbusmock/dbusmock-0.16.7.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="xml(+)"
+
+inherit distutils-r1
+
+MY_PN="python-${PN}"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Easily create mock objects on D-Bus for software testing"
+HOMEPAGE="https://github.com/martinpitt/python-dbusmock"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64"
+IUSE="test"
+
+RDEPEND="
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-17.1[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-disable-pyflakes-test.patch
+)
+
+python_test() {
+ nosetests --verbose || die "tests fail under ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( NEWS README.rst )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/dbusmock/dbusmock-0.16.9.ebuild b/dev-python/dbusmock/dbusmock-0.16.9.ebuild
new file mode 100644
index 000000000000..1ec19dbae4f0
--- /dev/null
+++ b/dev-python/dbusmock/dbusmock-0.16.9.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="xml(+)"
+
+inherit distutils-r1
+
+MY_PN="python-${PN}"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Easily create mock objects on D-Bus for software testing"
+HOMEPAGE="https://github.com/martinpitt/python-dbusmock"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-17.1[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/0.16.9-disable-style-tests.patch
+ "${FILESDIR}"/0.16.9-replace-dbus-launch.patch
+)
+
+python_test() {
+ nosetests --verbose || die "tests fail under ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( NEWS README.rst )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/dbusmock/files/0.16.7-disable-pyflakes-test.patch b/dev-python/dbusmock/files/0.16.7-disable-pyflakes-test.patch
new file mode 100644
index 000000000000..160003ce5eac
--- /dev/null
+++ b/dev-python/dbusmock/files/0.16.7-disable-pyflakes-test.patch
@@ -0,0 +1,20 @@
+https://github.com/martinpitt/python-dbusmock/issues/28
+
+--- a/tests/test_code.orig
++++ b/tests/test_code.py
+@@ -17,6 +17,7 @@
+
+
+ class StaticCodeTests(unittest.TestCase):
++ """
+ @unittest.skipIf(subprocess.call(['which', 'pyflakes'],
+ stdout=subprocess.PIPE) != 0,
+ 'pyflakes not installed')
+@@ -25,6 +26,7 @@
+ universal_newlines=True)
+ (out, err) = pyflakes.communicate()
+ self.assertEqual(pyflakes.returncode, 0, out)
++ """
+
+ @unittest.skipIf(subprocess.call(['which', 'pep8'],
+ stdout=subprocess.PIPE) != 0,
diff --git a/dev-python/dbusmock/files/0.16.9-disable-style-tests.patch b/dev-python/dbusmock/files/0.16.9-disable-style-tests.patch
new file mode 100644
index 000000000000..cb7febdb4e53
--- /dev/null
+++ b/dev-python/dbusmock/files/0.16.9-disable-style-tests.patch
@@ -0,0 +1,14 @@
+These tests are bound to fail dependending on QA tools updates
+
+https://github.com/martinpitt/python-dbusmock/issues/28
+
+--- a/tests/test_code.py 2017-08-16 09:20:43.848503995 +0200
++++ b/tests/test_code.py 2017-08-16 09:20:54.410177037 +0200
+@@ -21,6 +21,7 @@
+ pycodestyle = None
+
+
++@unittest.skip('style tests')
+ class StaticCodeTests(unittest.TestCase):
+ @unittest.skipIf(subprocess.call(['which', 'pyflakes'], stdout=subprocess.PIPE) != 0,
+ 'pyflakes not installed')
diff --git a/dev-python/dbusmock/files/0.16.9-replace-dbus-launch.patch b/dev-python/dbusmock/files/0.16.9-replace-dbus-launch.patch
new file mode 100644
index 000000000000..54149ed033aa
--- /dev/null
+++ b/dev-python/dbusmock/files/0.16.9-replace-dbus-launch.patch
@@ -0,0 +1,76 @@
+From 9470c54a2836795974e83e55ea859e4653b20b37 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin@piware.de>
+Date: Mon, 19 Jun 2017 16:31:28 +0200
+Subject: [PATCH] Call dbus-daemon directly instead of dbus-launch
+
+dbus-launch is X11 specific and being deprecated.
+
+Adjust documentation to use dbus-run-session instead.
+
+https://bugs.debian.org/836053
+---
+ NEWS | 4 ++++
+ README.rst | 6 +++---
+ dbusmock/testcase.py | 18 ++++++++++--------
+ 3 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index c1250ea..181a4df 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,7 @@
++0.17 (UNRELEASED)
++-----------------
++ - Call dbus-daemon directly instead of dbus-launch. (Debian #836053)
++
+ 0.16.9 (2017-06-19)
+ -------------------
+ - NetworkManager template: Fix type of 'State' property in AddActiveConnection()
+diff --git a/README.rst b/README.rst
+index 3dc4552..310e1ac 100644
+--- a/README.rst
++++ b/README.rst
+@@ -118,9 +118,9 @@ Let's walk through:
+ Simple example from shell
+ -------------------------
+
+-We use the actual session bus for this example. You can use ``dbus-launch`` to
+-start a private one as well if you want, but that is not part of the actual
+-mocking.
++We use the actual session bus for this example. You can use
++``dbus-run-session`` to start a private one as well if you want, but that is
++not part of the actual mocking.
+
+ So let's start a mock at the D-Bus name ``com.example.Foo`` with an initial
+ "main" object on path /, with the main D-Bus interface
+diff --git a/dbusmock/testcase.py b/dbusmock/testcase.py
+index 825c61f..49787e2 100644
+--- a/dbusmock/testcase.py
++++ b/dbusmock/testcase.py
+@@ -97,16 +97,18 @@ def start_dbus(klass, conf=None):
+ Normally you do not need to call this directly. Use start_system_bus()
+ and start_session_bus() instead.
+ '''
+- argv = ['dbus-launch']
++ argv = ['dbus-daemon', '--fork', '--print-address=1', '--print-pid=1']
+ if conf:
+ argv.append('--config-file=' + conf)
+- out = subprocess.check_output(argv, universal_newlines=True)
+- variables = {}
+- for line in out.splitlines():
+- (k, v) = line.split('=', 1)
+- variables[k] = v
+- return (int(variables['DBUS_SESSION_BUS_PID']),
+- variables['DBUS_SESSION_BUS_ADDRESS'])
++ else:
++ argv.append('--session')
++ lines = subprocess.check_output(argv, universal_newlines=True).strip().splitlines()
++ assert len(lines) == 2, 'expected exactly 2 lines of output from dbus-daemon'
++ # usually the first line is the address, but be lenient and accept any order
++ try:
++ return (int(lines[1]), lines[0])
++ except ValueError:
++ return (int(lines[0]), lines[1])
+
+ @classmethod
+ def stop_dbus(klass, pid):
diff --git a/dev-python/dbusmock/metadata.xml b/dev-python/dbusmock/metadata.xml
new file mode 100644
index 000000000000..996e7cacd217
--- /dev/null
+++ b/dev-python/dbusmock/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+</pkgmetadata>