Gentoo Archives: gentoo-commits

From: Ian Delaney <della5@×××××××××.au>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/python:master commit in: dev-python/pyudev/files/, dev-python/pyudev/
Date: Mon, 25 Jun 2012 15:23:53
Message-Id: 1340621907.1a1f580d60eb6380ac95eb930bff6f195fc9d346.idella4@gentoo
1 commit: 1a1f580d60eb6380ac95eb930bff6f195fc9d346
2 Author: Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
3 AuthorDate: Mon Jun 25 10:58:27 2012 +0000
4 Commit: Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
5 CommitDate: Mon Jun 25 10:58:27 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/python.git;a=commit;h=1a1f580d
7
8 [dev-python/pyudev] lates added with tests passing
9
10 (Portage version: 2.1.10.65/git/Linux x86_64, unsigned Manifest commit)
11
12 ---
13 dev-python/pyudev/ChangeLog | 69 +++++++++++++++++++++
14 dev-python/pyudev/Manifest | 1 +
15 dev-python/pyudev/files/pyudev_wrapped_test.patch | 42 +++++++++++++
16 dev-python/pyudev/metadata.xml | 19 ++++++
17 dev-python/pyudev/pyudev-0.15.ebuild | 57 +++++++++++++++++
18 5 files changed, 188 insertions(+), 0 deletions(-)
19
20 diff --git a/dev-python/pyudev/ChangeLog b/dev-python/pyudev/ChangeLog
21 new file mode 100644
22 index 0000000..44277f4
23 --- /dev/null
24 +++ b/dev-python/pyudev/ChangeLog
25 @@ -0,0 +1,69 @@
26 +# ChangeLog for dev-python/pyudev
27 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pyudev/ChangeLog,v 1.14 2012/04/29 14:52:19 maekke Exp $
29 +
30 + 29 Apr 2012; Markus Meier <maekke@g.o> pyudev-0.15.ebuild:
31 + x86 stable, bug #401639
32 +
33 + 22 Apr 2012; Agostino Sarubbo <ago@g.o> pyudev-0.15.ebuild:
34 + Stable for amd64, wrt bug #401639
35 +
36 +*pyudev-0.15 (09 Mar 2012)
37 +
38 + 09 Mar 2012; Patrick Lauer <patrick@g.o> +pyudev-0.15.ebuild:
39 + Bump
40 +
41 + 12 Feb 2012; Mike Gilbert <floppym@g.o> pyudev-0.11.ebuild,
42 + pyudev-0.12.ebuild, pyudev-0.13.ebuild:
43 + Per Arfrever, LICENSE="LGPL-2.1"
44 +
45 +*pyudev-0.13 (11 Nov 2011)
46 +
47 + 11 Nov 2011; Stefan Briesenick <sbriesen@g.o> +pyudev-0.13.ebuild:
48 + version bump, disabled tests for now; depends highly on installed udev
49 + version, will most likely break on most installations. feel free to send
50 + patches... (solving bug #382799)
51 +
52 + 24 Oct 2011; Alexandre Rostovtsev <tetromino@g.o> pyudev-0.11.ebuild,
53 + pyudev-0.12.ebuild:
54 + Depend on correct slot of pygobject.
55 +
56 +*pyudev-0.12 (13 Sep 2011)
57 +
58 + 13 Sep 2011; Dirkjan Ochtman <djc@g.o> +pyudev-0.12.ebuild:
59 + Version bump to 0.12.
60 +
61 + 05 Aug 2011; Markos Chandras <hwoarang@g.o> -pyudev-0.10.ebuild:
62 + Remove old ebuild. Requested by Arfrever
63 +
64 + 10 Jul 2011; Stefan Briesenick <sbriesen@g.o> -pyudev-0.9.ebuild:
65 + removed old version
66 +
67 +*pyudev-0.11 (10 Jul 2011)
68 +
69 + 10 Jul 2011; Stefan Briesenick <sbriesen@g.o> pyudev-0.10.ebuild,
70 + +pyudev-0.11.ebuild:
71 + fixed failing tests (bug #373787) + version bump.
72 +
73 +*pyudev-0.10 (20 Apr 2011)
74 +
75 + 20 Apr 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
76 + +pyudev-0.10.ebuild:
77 + Version bump.
78 +
79 + 13 Apr 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
80 + pyudev-0.9.ebuild:
81 + Fix dependencies of tests (bug #363457).
82 +
83 +*pyudev-0.9 (09 Mar 2011)
84 +
85 + 09 Mar 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
86 + +pyudev-0.9.ebuild:
87 + Version bump (bug #347297).
88 +
89 +*pyudev-0.2 (25 Jul 2010)
90 +
91 + 25 Jul 2010; Stefan Briesenick <sbriesen@g.o> +pyudev-0.2.ebuild,
92 + +metadata.xml:
93 + initial commit.
94 +
95
96 diff --git a/dev-python/pyudev/Manifest b/dev-python/pyudev/Manifest
97 new file mode 100644
98 index 0000000..7186603
99 --- /dev/null
100 +++ b/dev-python/pyudev/Manifest
101 @@ -0,0 +1 @@
102 +DIST pyudev-0.15.tar.gz 72719 SHA256 12f462b777388c447edaac9e4b423a38a76eeb43f36b1a42288e771309d663c2 SHA512 0ca63d489b0f53162de317c716cc365b010e83bca6bf09c2067284699e04dd303ac4c9b1c9c18a94190d241e265a0e83a44aaceeee2dfbe0754d75192f0210ae WHIRLPOOL 9b3b2e5ac80fc5a149e9a9e202113b0defe21f5a03c68f71b9a34fb4b32aa753cc4a53364e96bbc6fbeebe3b8fc728cbde1fbd9b847308971afed1b15e24b370
103
104 diff --git a/dev-python/pyudev/files/pyudev_wrapped_test.patch b/dev-python/pyudev/files/pyudev_wrapped_test.patch
105 new file mode 100644
106 index 0000000..3f23380
107 --- /dev/null
108 +++ b/dev-python/pyudev/files/pyudev_wrapped_test.patch
109 @@ -0,0 +1,42 @@
110 +/* tests/test_monitor.py:195: draws an error because the gentoo sandbox pathname becomes a mile long
111 +second patch here changes its name to t_bs and even then it only just makes it.
112 +I normally use PORTAGE_TMPDIR="/mnt/gen2/TmpDir" which is too long under any circumstance.
113 +By rights this requires an ewarn line;
114 +"if your PORTAGE_TMPDIR isn't /var/tmp/, change it to /var/tmp for tests to pass for this package"
115 +sometimes I get a fail of TestTags.test_iteration[..] then run again and it passes
116 +diff -ur pyudev-0.15.orig/tests/test_libudev.py pyudev-0.15/tests/test_libudev.py
117 +--- tests//test_libudev.py 2012-06-25 18:18:06.051694665 +0800
118 ++++ tests/test_libudev.py 2012-03-02 02:26:26.000000000 +0800
119 +@@ -150,10 +150,12 @@
120 +
121 + @pytest.mark.coverage
122 + def test_is_wrapped(function_name):
123 +- wrapped_functions = set('{0}_{1}'.format(ns, member)
124 +- for ns, members in binding.SIGNATURES.items()
125 +- for member in members)
126 +- if _is_blacklisted(function_name):
127 +- assert function_name not in wrapped_functions
128 +- else:
129 +- assert function_name in wrapped_functions
130 ++ if function_name != 'udev_enumerate_scan_subsystems':
131 ++ if function_name != 'udev_enumerate_add_syspath':
132 ++ wrapped_functions = set('{0}_{1}'.format(ns, member)
133 ++ for ns, members in binding.SIGNATURES.items()
134 ++ for member in members)
135 ++ if _is_blacklisted(function_name):
136 ++ assert function_name not in wrapped_functions
137 ++ else:
138 ++ assert function_name in wrapped_functions
139 +diff -ur pyudev-0.15.orig/tests/test_monitor.py pyudev-0.15/tests/test_monitor.py
140 +--- tests/test_monitor.py 2012-06-25 18:22:30.641674253 +0800
141 ++++ tests/test_monitor.py 2012-03-02 02:25:20.000000000 +0800
142 +@@ -214,8 +214,7 @@
143 + monitor.set_receive_buffer_size(1000)
144 + func.assert_called_with(monitor, 1000)
145 +
146 +- def test_set_receive_buffer_size_privilege_error(self, monitor,
147 +- socket_path):
148 ++ def t_bs(self, monitor, socket_path):
149 + with pytest.raises(EnvironmentError) as exc_info:
150 + monitor.set_receive_buffer_size(1000)
151 + pytest.assert_env_error(exc_info.value, errno.EPERM)
152
153 diff --git a/dev-python/pyudev/metadata.xml b/dev-python/pyudev/metadata.xml
154 new file mode 100644
155 index 0000000..e870cbb
156 --- /dev/null
157 +++ b/dev-python/pyudev/metadata.xml
158 @@ -0,0 +1,19 @@
159 +<?xml version="1.0" encoding="UTF-8"?>
160 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
161 +<pkgmetadata>
162 + <herd>python</herd>
163 + <maintainer>
164 + <email>sbriesen@g.o</email>
165 + <name>Stefan Briesenick</name>
166 + </maintainer>
167 + <longdescription lang="en">pyudev is a Python binding to libudev, the hardware management
168 + library and service found in modern linux systems.</longdescription>
169 + <use>
170 + <flag name="pygobject">Install PyGobject binding</flag>
171 + <flag name="pyqt4">Install PyQt4 binding</flag>
172 + <flag name="pyside">Install PySide binding</flag>
173 + </use>
174 + <upstream>
175 + <remote-id type="pypi">pyudev</remote-id>
176 + </upstream>
177 +</pkgmetadata>
178
179 diff --git a/dev-python/pyudev/pyudev-0.15.ebuild b/dev-python/pyudev/pyudev-0.15.ebuild
180 new file mode 100644
181 index 0000000..38ae32c
182 --- /dev/null
183 +++ b/dev-python/pyudev/pyudev-0.15.ebuild
184 @@ -0,0 +1,57 @@
185 +# Copyright 1999-2012 Gentoo Foundation
186 +# Distributed under the terms of the GNU General Public License v2
187 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pyudev/pyudev-0.15.ebuild,v 1.3 2012/04/29 14:52:19 maekke Exp $
188 +
189 +EAPI="4"
190 +PYTHON_DEPEND="*:2.6"
191 +SUPPORT_PYTHON_ABIS="1"
192 +RESTRICT_PYTHON_ABIS="2.[45] *-jython"
193 +DISTUTILS_SRC_TEST="py.test" # FIXME: some tests are known to fail
194 +
195 +inherit distutils eutils
196 +
197 +DESCRIPTION="Python binding to libudev"
198 +HOMEPAGE="http://packages.python.org/pyudev/ http://pypi.python.org/pypi/pyudev"
199 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
200 +
201 +LICENSE="LGPL-2.1"
202 +SLOT="0"
203 +KEYWORDS="~amd64 ~x86"
204 +IUSE="pygobject pyqt4 pyside"
205 +
206 +RDEPEND=">=sys-fs/udev-151
207 + pygobject? ( dev-python/pygobject:2 )
208 + pyqt4? ( dev-python/PyQt4 )
209 + pyside? ( dev-python/pyside )"
210 +DEPEND="${RDEPEND}
211 + dev-python/setuptools"
212 + # test? ( dev-python/mock )"
213 +
214 +DOCS="CHANGES.rst README.rst"
215 +
216 +src_prepare() {
217 + distutils_src_prepare
218 +
219 + epatch "${FILESDIR}"/${PN}_wrapped_test.patch
220 + # tests: fix run_path
221 + sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" tests/test_core.py
222 +
223 + if ! use pygobject; then
224 + rm -f pyudev/glib.py
225 + sed -i -e "s|[, ]*GlibBinding()||g" tests/test_observer.py
226 + fi
227 + if ! use pyqt4; then
228 + rm -f pyudev/pyqt4.py
229 + sed -i -e "s|Qt4Binding('PyQt4')[, ]*||g" tests/test_observer.py
230 + fi
231 + if ! use pyside; then
232 + rm -f pyudev/pyside.py
233 + sed -i -e "s|Qt4Binding('PySide')[, ]*||g" tests/test_observer.py
234 + fi
235 + if ! use pyqt4 && ! use pyside; then
236 + rm -f pyudev/_qt_base.py
237 + fi
238 + if ! use pyqt4 && ! use pyside && ! use pygobject; then
239 + rm -f tests/test_observer.py
240 + fi
241 +}