From ee467530004dde053a8c7eac249eb4fc4a87457a Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Sun, 28 May 2017 18:15:02 +0300 Subject: dev-python/dbusmock: New package for easily running tests by D-Bus requiring software Needed by gnome-settings-daemon power plugin tests --- dev-python/dbusmock/Manifest | 1 + dev-python/dbusmock/dbusmock-0.16.7.ebuild | 45 ++++++++++++++++++++++ .../files/0.16.7-disable-pyflakes-test.patch | 20 ++++++++++ dev-python/dbusmock/metadata.xml | 8 ++++ 4 files changed, 74 insertions(+) create mode 100644 dev-python/dbusmock/Manifest create mode 100644 dev-python/dbusmock/dbusmock-0.16.7.ebuild create mode 100644 dev-python/dbusmock/files/0.16.7-disable-pyflakes-test.patch create mode 100644 dev-python/dbusmock/metadata.xml (limited to 'dev-python/dbusmock') diff --git a/dev-python/dbusmock/Manifest b/dev-python/dbusmock/Manifest new file mode 100644 index 000000000000..456da5e87fea --- /dev/null +++ b/dev-python/dbusmock/Manifest @@ -0,0 +1 @@ +DIST dbusmock-0.16.7.tar.gz 70544 SHA256 2d2ea892fa4633c3ec6ac1e912120ec493047a5c6522849b7d1c95ad755bce75 SHA512 749728b966b1e067a0a8bd61ee64c1c7ff22751ccb48e15096d041e78c6e779d787160ee191e90daa3177b92c0ee45c66af74b2dd4e4bcb570892b431ec13467 WHIRLPOOL 921c47fb0b86a6a3368c3b37c27f30b75edacefb46f1a726e39f35eb7b1ea7d0f78c3a7e04b218016c558578625ff28188bfece7cbc7aa06405effe4ab614f92 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..7eebfd8ebe4f --- /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" +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/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/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 @@ + + + + + gnome@gentoo.org + Gentoo GNOME Desktop + + -- cgit v1.2.3-65-gdbad