summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney2012-06-25 10:58:27 (GMT)
committerIan Delaney2012-06-25 10:58:27 (GMT)
commit1a1f580d60eb6380ac95eb930bff6f195fc9d346 (patch)
tree2b7ab525c8e095dc7e565a76c7b246a3ffe4534c
parent0f606751651e6b9646778ad5b5cbd639f057490f (diff)
[dev-python/pyudev] lates added with tests passing
(Portage version: 2.1.10.65/git/Linux x86_64, unsigned Manifest commit)
-rw-r--r--dev-python/pyudev/ChangeLog69
-rw-r--r--dev-python/pyudev/Manifest1
-rw-r--r--dev-python/pyudev/files/pyudev_wrapped_test.patch42
-rw-r--r--dev-python/pyudev/metadata.xml19
-rw-r--r--dev-python/pyudev/pyudev-0.15.ebuild57
5 files changed, 188 insertions, 0 deletions
diff --git a/dev-python/pyudev/ChangeLog b/dev-python/pyudev/ChangeLog
new file mode 100644
index 0000000..44277f4
--- /dev/null
+++ b/dev-python/pyudev/ChangeLog
@@ -0,0 +1,69 @@
+# ChangeLog for dev-python/pyudev
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyudev/ChangeLog,v 1.14 2012/04/29 14:52:19 maekke Exp $
+
+ 29 Apr 2012; Markus Meier <maekke@gentoo.org> pyudev-0.15.ebuild:
+ x86 stable, bug #401639
+
+ 22 Apr 2012; Agostino Sarubbo <ago@gentoo.org> pyudev-0.15.ebuild:
+ Stable for amd64, wrt bug #401639
+
+*pyudev-0.15 (09 Mar 2012)
+
+ 09 Mar 2012; Patrick Lauer <patrick@gentoo.org> +pyudev-0.15.ebuild:
+ Bump
+
+ 12 Feb 2012; Mike Gilbert <floppym@gentoo.org> pyudev-0.11.ebuild,
+ pyudev-0.12.ebuild, pyudev-0.13.ebuild:
+ Per Arfrever, LICENSE="LGPL-2.1"
+
+*pyudev-0.13 (11 Nov 2011)
+
+ 11 Nov 2011; Stefan Briesenick <sbriesen@gentoo.org> +pyudev-0.13.ebuild:
+ version bump, disabled tests for now; depends highly on installed udev
+ version, will most likely break on most installations. feel free to send
+ patches... (solving bug #382799)
+
+ 24 Oct 2011; Alexandre Rostovtsev <tetromino@gentoo.org> pyudev-0.11.ebuild,
+ pyudev-0.12.ebuild:
+ Depend on correct slot of pygobject.
+
+*pyudev-0.12 (13 Sep 2011)
+
+ 13 Sep 2011; Dirkjan Ochtman <djc@gentoo.org> +pyudev-0.12.ebuild:
+ Version bump to 0.12.
+
+ 05 Aug 2011; Markos Chandras <hwoarang@gentoo.org> -pyudev-0.10.ebuild:
+ Remove old ebuild. Requested by Arfrever
+
+ 10 Jul 2011; Stefan Briesenick <sbriesen@gentoo.org> -pyudev-0.9.ebuild:
+ removed old version
+
+*pyudev-0.11 (10 Jul 2011)
+
+ 10 Jul 2011; Stefan Briesenick <sbriesen@gentoo.org> pyudev-0.10.ebuild,
+ +pyudev-0.11.ebuild:
+ fixed failing tests (bug #373787) + version bump.
+
+*pyudev-0.10 (20 Apr 2011)
+
+ 20 Apr 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ +pyudev-0.10.ebuild:
+ Version bump.
+
+ 13 Apr 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ pyudev-0.9.ebuild:
+ Fix dependencies of tests (bug #363457).
+
+*pyudev-0.9 (09 Mar 2011)
+
+ 09 Mar 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ +pyudev-0.9.ebuild:
+ Version bump (bug #347297).
+
+*pyudev-0.2 (25 Jul 2010)
+
+ 25 Jul 2010; Stefan Briesenick <sbriesen@gentoo.org> +pyudev-0.2.ebuild,
+ +metadata.xml:
+ initial commit.
+
diff --git a/dev-python/pyudev/Manifest b/dev-python/pyudev/Manifest
new file mode 100644
index 0000000..7186603
--- /dev/null
+++ b/dev-python/pyudev/Manifest
@@ -0,0 +1 @@
+DIST pyudev-0.15.tar.gz 72719 SHA256 12f462b777388c447edaac9e4b423a38a76eeb43f36b1a42288e771309d663c2 SHA512 0ca63d489b0f53162de317c716cc365b010e83bca6bf09c2067284699e04dd303ac4c9b1c9c18a94190d241e265a0e83a44aaceeee2dfbe0754d75192f0210ae WHIRLPOOL 9b3b2e5ac80fc5a149e9a9e202113b0defe21f5a03c68f71b9a34fb4b32aa753cc4a53364e96bbc6fbeebe3b8fc728cbde1fbd9b847308971afed1b15e24b370
diff --git a/dev-python/pyudev/files/pyudev_wrapped_test.patch b/dev-python/pyudev/files/pyudev_wrapped_test.patch
new file mode 100644
index 0000000..3f23380
--- /dev/null
+++ b/dev-python/pyudev/files/pyudev_wrapped_test.patch
@@ -0,0 +1,42 @@
+/* tests/test_monitor.py:195: draws an error because the gentoo sandbox pathname becomes a mile long
+second patch here changes its name to t_bs and even then it only just makes it.
+I normally use PORTAGE_TMPDIR="/mnt/gen2/TmpDir" which is too long under any circumstance.
+By rights this requires an ewarn line;
+"if your PORTAGE_TMPDIR isn't /var/tmp/, change it to /var/tmp for tests to pass for this package"
+sometimes I get a fail of TestTags.test_iteration[..] then run again and it passes
+diff -ur pyudev-0.15.orig/tests/test_libudev.py pyudev-0.15/tests/test_libudev.py
+--- tests//test_libudev.py 2012-06-25 18:18:06.051694665 +0800
++++ tests/test_libudev.py 2012-03-02 02:26:26.000000000 +0800
+@@ -150,10 +150,12 @@
+
+ @pytest.mark.coverage
+ def test_is_wrapped(function_name):
+- wrapped_functions = set('{0}_{1}'.format(ns, member)
+- for ns, members in binding.SIGNATURES.items()
+- for member in members)
+- if _is_blacklisted(function_name):
+- assert function_name not in wrapped_functions
+- else:
+- assert function_name in wrapped_functions
++ if function_name != 'udev_enumerate_scan_subsystems':
++ if function_name != 'udev_enumerate_add_syspath':
++ wrapped_functions = set('{0}_{1}'.format(ns, member)
++ for ns, members in binding.SIGNATURES.items()
++ for member in members)
++ if _is_blacklisted(function_name):
++ assert function_name not in wrapped_functions
++ else:
++ assert function_name in wrapped_functions
+diff -ur pyudev-0.15.orig/tests/test_monitor.py pyudev-0.15/tests/test_monitor.py
+--- tests/test_monitor.py 2012-06-25 18:22:30.641674253 +0800
++++ tests/test_monitor.py 2012-03-02 02:25:20.000000000 +0800
+@@ -214,8 +214,7 @@
+ monitor.set_receive_buffer_size(1000)
+ func.assert_called_with(monitor, 1000)
+
+- def test_set_receive_buffer_size_privilege_error(self, monitor,
+- socket_path):
++ def t_bs(self, monitor, socket_path):
+ with pytest.raises(EnvironmentError) as exc_info:
+ monitor.set_receive_buffer_size(1000)
+ pytest.assert_env_error(exc_info.value, errno.EPERM)
diff --git a/dev-python/pyudev/metadata.xml b/dev-python/pyudev/metadata.xml
new file mode 100644
index 0000000..e870cbb
--- /dev/null
+++ b/dev-python/pyudev/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <maintainer>
+ <email>sbriesen@gentoo.org</email>
+ <name>Stefan Briesenick</name>
+ </maintainer>
+ <longdescription lang="en">pyudev is a Python binding to libudev, the hardware management
+ library and service found in modern linux systems.</longdescription>
+ <use>
+ <flag name="pygobject">Install PyGobject binding</flag>
+ <flag name="pyqt4">Install PyQt4 binding</flag>
+ <flag name="pyside">Install PySide binding</flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">pyudev</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pyudev/pyudev-0.15.ebuild b/dev-python/pyudev/pyudev-0.15.ebuild
new file mode 100644
index 0000000..38ae32c
--- /dev/null
+++ b/dev-python/pyudev/pyudev-0.15.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyudev/pyudev-0.15.ebuild,v 1.3 2012/04/29 14:52:19 maekke Exp $
+
+EAPI="4"
+PYTHON_DEPEND="*:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] *-jython"
+DISTUTILS_SRC_TEST="py.test" # FIXME: some tests are known to fail
+
+inherit distutils eutils
+
+DESCRIPTION="Python binding to libudev"
+HOMEPAGE="http://packages.python.org/pyudev/ http://pypi.python.org/pypi/pyudev"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pygobject pyqt4 pyside"
+
+RDEPEND=">=sys-fs/udev-151
+ pygobject? ( dev-python/pygobject:2 )
+ pyqt4? ( dev-python/PyQt4 )
+ pyside? ( dev-python/pyside )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
+ # test? ( dev-python/mock )"
+
+DOCS="CHANGES.rst README.rst"
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}"/${PN}_wrapped_test.patch
+ # tests: fix run_path
+ sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" tests/test_core.py
+
+ if ! use pygobject; then
+ rm -f pyudev/glib.py
+ sed -i -e "s|[, ]*GlibBinding()||g" tests/test_observer.py
+ fi
+ if ! use pyqt4; then
+ rm -f pyudev/pyqt4.py
+ sed -i -e "s|Qt4Binding('PyQt4')[, ]*||g" tests/test_observer.py
+ fi
+ if ! use pyside; then
+ rm -f pyudev/pyside.py
+ sed -i -e "s|Qt4Binding('PySide')[, ]*||g" tests/test_observer.py
+ fi
+ if ! use pyqt4 && ! use pyside; then
+ rm -f pyudev/_qt_base.py
+ fi
+ if ! use pyqt4 && ! use pyside && ! use pygobject; then
+ rm -f tests/test_observer.py
+ fi
+}