1 |
commit: 8235a0fc89ccefc623538ba4592ab33cb697da5a |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 27 11:09:04 2017 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 27 11:13:37 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8235a0fc |
7 |
|
8 |
dev-python/pyudev: remove old |
9 |
|
10 |
dev-python/pyudev/Manifest | 2 - |
11 |
.../pyudev-0.19.0-Fixes-for-ID_PATH-parsing.patch | 213 --------------------- |
12 |
dev-python/pyudev/pyudev-0.16.1-r1.ebuild | 69 ------- |
13 |
dev-python/pyudev/pyudev-0.19.0.ebuild | 62 ------ |
14 |
4 files changed, 346 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/pyudev/Manifest b/dev-python/pyudev/Manifest |
17 |
index f2c7dbf42bd..d9b1f98c5d4 100644 |
18 |
--- a/dev-python/pyudev/Manifest |
19 |
+++ b/dev-python/pyudev/Manifest |
20 |
@@ -1,4 +1,2 @@ |
21 |
-DIST pyudev-0.16.1.tar.gz 74953 SHA256 765d1c14bd9bd031f64e2612225621984cb2bbb8cbc0c03538bcc4c735ff1c95 SHA512 7f62c6794027411583f874bdf746de457f19048955867d30008bc1ee0d30040a97f73b9e52ae3645d469fc401128703d4e703e294b85481e927ffaba27e45e6a WHIRLPOOL 4c366a1eed92bf274ef84eab6242beb09cd6e906556f6ccb24113fafec2dcc47b8da94487505473fc6f7b39539cdc2809cef2d07a1ab8c0616fc73efba9b2e1a |
22 |
-DIST pyudev-0.19.0.tar.gz 96556 SHA256 5abcbd03e4965110d1fedcbdd5532974cb4638ceef34337aa2d5758eceb54ad3 SHA512 7faee69e8e3512e27b0d9271191d4b2906652b2c7f3a803be026a10499d184c1fc41db80624dec9f33ee890d71a695214c6bfd47f6cc41b979f71f619836f3f8 WHIRLPOOL 6b496f0f977b97247a13ba4f9f8efe24624d932c6cfc7616922473d8839a90500f60d3b238bbab4a9c9cdd6c5997606ee41de63669e3b2fa868d1b6f28ae492b |
23 |
DIST pyudev-0.20.0.tar.gz 93217 SHA256 14d85bc9611dbf798732996cb7107858f58a3a1b9d246e4063c7a20ade65842a SHA512 e86a776a2b6d29f206cdd0057c6f9b1e705d981ec8c2de49259887647856531af68238b80751102a3ffc8cea6f234cc520d62c8bc2da686e453ed010da3ebb02 WHIRLPOOL 8344c668c1cc2e7971a67d0e628e3ce96254648ad06b48f260dd4ee54e3e205e533e59b692169b38dd656c08d8cd615d0c7c518b5c2a785553b8c6468e70520c |
24 |
DIST pyudev-0.21.0.tar.gz 89469 SHA256 094b7a100150114748aaa3b70663485dd360457a709bfaaafe5a977371033f2b SHA512 ba5b6156768b65b9655d809b14378b01173643781b9c4017271e880cdfed442c44ac49eb26c970e4275b820e01678e3001870591fccf88dc713ec941e2b85d11 WHIRLPOOL e69865d8b33ab103e0ff6371df4e05617c3907cbfc98d508285c7464065ccace6dc7d4e963035e19392e6ab39881281e684ddd4f7765fc599874411204ea825b |
25 |
|
26 |
diff --git a/dev-python/pyudev/files/pyudev-0.19.0-Fixes-for-ID_PATH-parsing.patch b/dev-python/pyudev/files/pyudev-0.19.0-Fixes-for-ID_PATH-parsing.patch |
27 |
deleted file mode 100644 |
28 |
index 6a9bf659bb9..00000000000 |
29 |
--- a/dev-python/pyudev/files/pyudev-0.19.0-Fixes-for-ID_PATH-parsing.patch |
30 |
+++ /dev/null |
31 |
@@ -1,213 +0,0 @@ |
32 |
-commit b1cc8624a2ad8afdc04181ccf6ca42c37a9a701e |
33 |
-Author: mulhern <amulhern@××××××.com> |
34 |
-Date: Mon Feb 15 14:13:49 2016 -0500 |
35 |
- |
36 |
- Fixes for ID_PATH parsing. |
37 |
- |
38 |
- * Disable individual fields matching '-'. |
39 |
- * Do not try to parse delimiter '-' between distinct ids. |
40 |
- * Change format for a sas path. |
41 |
- * Handle virtio-pci. |
42 |
- |
43 |
- Signed-off-by: mulhern <amulhern@××××××.com> |
44 |
- |
45 |
-diff --git a/src/pyudev/_parsing/_id_path.py b/src/pyudev/_parsing/_id_path.py |
46 |
-index c94f332..0b65c43 100644 |
47 |
---- a/src/pyudev/_parsing/_id_path.py |
48 |
-+++ b/src/pyudev/_parsing/_id_path.py |
49 |
-@@ -35,6 +35,16 @@ |
50 |
- from ._shared import Parser |
51 |
- |
52 |
- |
53 |
-+class IdPathField(Field): |
54 |
-+ """ |
55 |
-+ Overrides default regular expression. |
56 |
-+ """ |
57 |
-+ # pylint: disable=too-few-public-methods |
58 |
-+ |
59 |
-+ def __init__(self, name, regexp=r'[^-]+', description=None): |
60 |
-+ super(IdPathField, self).__init__(name, regexp, description) |
61 |
-+ |
62 |
-+ |
63 |
- class IdPathParsers(object): |
64 |
- """ |
65 |
- Aggregate parsers. |
66 |
-@@ -42,70 +52,73 @@ class IdPathParsers(object): |
67 |
- # pylint: disable=too-few-public-methods |
68 |
- |
69 |
- PARSERS = [ |
70 |
-- Parser(r'acpi-%s', [Field('sys_name')]), |
71 |
-- Parser(r'ap-%s', [Field('sys_name')]), |
72 |
-- Parser(r'ata-%s', [Field('port_no')]), |
73 |
-- Parser(r'bcma-%s', [Field('core')]), |
74 |
-- Parser(r'cciss-disk%s', [Field('disk')]), |
75 |
-- Parser(r'ccw-%s', [Field('sys_name')]), |
76 |
-- Parser(r'ccwgroup-%s', [Field('sys_name')]), |
77 |
-- Parser(r'fc-%s-%s', [Field('port_name'), Field('lun')]), |
78 |
-+ Parser(r'acpi-%s', [IdPathField('sys_name')]), |
79 |
-+ Parser(r'ap-%s', [IdPathField('sys_name')]), |
80 |
-+ Parser(r'ata-%s', [IdPathField('port_no')]), |
81 |
-+ Parser(r'bcma-%s', [IdPathField('core')]), |
82 |
-+ Parser(r'cciss-disk%s', [IdPathField('disk')]), |
83 |
-+ Parser(r'ccw-%s', [IdPathField('sys_name')]), |
84 |
-+ Parser(r'ccwgroup-%s', [IdPathField('sys_name')]), |
85 |
-+ Parser(r'fc-%s-%s', [IdPathField('port_name'), IdPathField('lun')]), |
86 |
- Parser( |
87 |
- r'ip-%s:%s-iscsi-%s-%s', |
88 |
- [ |
89 |
-- Field('persistent_address'), |
90 |
-- Field('persistent_port'), |
91 |
-- Field('target_name'), |
92 |
-- Field('lun') |
93 |
-+ IdPathField('persistent_address'), |
94 |
-+ IdPathField('persistent_port'), |
95 |
-+ IdPathField('target_name'), |
96 |
-+ IdPathField('lun') |
97 |
- ] |
98 |
- ), |
99 |
-- Parser(r'iucv-%s', [Field('sys_name')]), |
100 |
-- Parser(r'nst%s', [Field('name')]), |
101 |
-- Parser(r'pci-%s', [Field('sys_name')]), |
102 |
-- Parser(r'platform-%s', [Field('sys_name')]), |
103 |
-- Parser(r'sas-%s-%s', [Field('sas_address'), Field('lun')]), |
104 |
-+ Parser(r'iucv-%s', [IdPathField('sys_name')]), |
105 |
-+ Parser(r'nst%s', [IdPathField('name')]), |
106 |
-+ Parser(r'pci-%s', [IdPathField('sys_name')]), |
107 |
-+ Parser(r'platform-%s', [IdPathField('sys_name')]), |
108 |
-+ Parser(r'sas-%s-lun-%s', |
109 |
-+ [IdPathField('sas_address'), IdPathField('lun')] |
110 |
-+ ), |
111 |
- Parser( |
112 |
- r'sas-exp%s-phy%s-%s', |
113 |
- [ |
114 |
-- Field( |
115 |
-+ IdPathField( |
116 |
- 'sas_address', |
117 |
- r'.*', |
118 |
- 'sysfs sas_address attribute of expander' |
119 |
- ), |
120 |
-- Field( |
121 |
-+ IdPathField( |
122 |
- 'phy_identifier', |
123 |
- r'.*', |
124 |
- 'sysfs phy_identifier attribute of target sas device' |
125 |
- ), |
126 |
-- Field('lun', description='sysnum of device (0 if none)') |
127 |
-+ IdPathField('lun', description='sysnum of device (0 if none)') |
128 |
- ] |
129 |
- ), |
130 |
- Parser( |
131 |
- r'sas-phy%s-%s', |
132 |
- [ |
133 |
-- Field( |
134 |
-+ IdPathField( |
135 |
- 'phy_identifier', |
136 |
- r'.*', |
137 |
- 'sysfs phy_identifier attribute of target sas device' |
138 |
- ), |
139 |
-- Field('lun', description='sysnum of device (0 if none)') |
140 |
-+ IdPathField('lun', description='sysnum of device (0 if none)') |
141 |
- ] |
142 |
- ), |
143 |
-- Parser(r'scm-%s', [Field('sys_name')]), |
144 |
-+ Parser(r'scm-%s', [IdPathField('sys_name')]), |
145 |
- Parser( |
146 |
- r'scsi-%s:%s:%s:%s', |
147 |
- [ |
148 |
-- Field('host'), |
149 |
-- Field('bus'), |
150 |
-- Field('target'), |
151 |
-- Field('lun') |
152 |
-+ IdPathField('host'), |
153 |
-+ IdPathField('bus'), |
154 |
-+ IdPathField('target'), |
155 |
-+ IdPathField('lun') |
156 |
- ] |
157 |
- ), |
158 |
-- Parser('serio-%s', [Field('sysnum')]), |
159 |
-- Parser('st%s', [Field('name')]), |
160 |
-- Parser('usb-0:%s', [Field('port')]), |
161 |
-- Parser('vmbus-%s-%s', [Field('guid'), Field('lun')]), |
162 |
-- Parser('xen-%s', [Field('sys_name')]) |
163 |
-+ Parser('serio-%s', [IdPathField('sysnum')]), |
164 |
-+ Parser('st%s', [IdPathField('name')]), |
165 |
-+ Parser('usb-0:%s', [IdPathField('port')]), |
166 |
-+ Parser('virtio-pci-%s', [IdPathField('sys_name')]), |
167 |
-+ Parser('vmbus-%s-%s', [IdPathField('guid'), IdPathField('lun')]), |
168 |
-+ Parser('xen-%s', [IdPathField('sys_name')]) |
169 |
- ] |
170 |
- |
171 |
- |
172 |
-@@ -166,6 +179,6 @@ def parse(self, value): |
173 |
- |
174 |
- (parser, best_match) = max(matches, key=lambda x: len(x[0].prefix)) |
175 |
- match_list.append((parser, best_match)) |
176 |
-- value = value[len(best_match.group('total')):] |
177 |
-+ value = value[len(best_match.group('total')) + 1:] |
178 |
- |
179 |
- return match_list |
180 |
-diff --git a/tests/test_parsing.py b/tests/test_parsing.py |
181 |
-index 619fb01..fba5575 100644 |
182 |
---- a/tests/test_parsing.py |
183 |
-+++ b/tests/test_parsing.py |
184 |
-@@ -52,20 +52,27 @@ class TestIDPATH(object): |
185 |
- Test parsing ID_PATH values. |
186 |
- """ |
187 |
- # pylint: disable=too-few-public-methods |
188 |
-- |
189 |
-- @given( |
190 |
-- strategies.sampled_from(_DEVICES).filter( |
191 |
-- lambda x: x.get('ID_PATH') is not None |
192 |
-- ) |
193 |
-+ _devices = [d for d in _DEVICES if d.get('ID_PATH') is not None] |
194 |
-+ @pytest.mark.skipif( |
195 |
-+ len(_devices) == 0, |
196 |
-+ reason="no devices with ID_PATH property" |
197 |
- ) |
198 |
-+ @given(strategies.sampled_from(_devices)) |
199 |
-+ @settings(min_satisfying_examples=1) |
200 |
- def test_parsing(self, a_device): |
201 |
- """ |
202 |
- Test that parsing is satisfactory on all examples. |
203 |
- """ |
204 |
-+ parsers = _parsing.IdPathParsers.PARSERS |
205 |
- id_path = a_device.get('ID_PATH') |
206 |
-- parser = _parsing.IdPathParse(_parsing.IdPathParsers.PARSERS) |
207 |
-+ parser = _parsing.IdPathParse(parsers) |
208 |
- result = parser.parse(id_path) |
209 |
- assert isinstance(result, list) and result != [] |
210 |
-+ assert all( |
211 |
-+ any(r[1].group('total').startswith(p.prefix) for p in parsers) \ |
212 |
-+ for r in result |
213 |
-+ ) |
214 |
-+ assert not any(r[1].group('total').startswith('-') for r in result) |
215 |
- |
216 |
- _devices = [d for d in _DEVICES if d.get('ID_SAS_PATH') is not None] |
217 |
- @pytest.mark.skipif( |
218 |
-@@ -78,10 +85,25 @@ def test_parsing_sas_path(self, a_device): |
219 |
- """ |
220 |
- Test that parsing is satisfactory on all examples. |
221 |
- """ |
222 |
-+ parsers = _parsing.IdPathParsers.PARSERS |
223 |
- id_path = a_device.get('ID_SAS_PATH') |
224 |
-- parser = _parsing.IdPathParse(_parsing.IdPathParsers.PARSERS) |
225 |
-+ parser = _parsing.IdPathParse(parsers) |
226 |
- result = parser.parse(id_path) |
227 |
- assert isinstance(result, list) and result != [] |
228 |
-+ assert all( |
229 |
-+ any(r[1].group('total').startswith(p.prefix) for p in parsers) \ |
230 |
-+ for r in result |
231 |
-+ ) |
232 |
-+ assert not any(r[1].group('total').startswith('-') for r in result) |
233 |
-+ |
234 |
-+ def test_failure(self): |
235 |
-+ """ |
236 |
-+ Test at least one failure. |
237 |
-+ """ |
238 |
-+ id_path = 'pci-0000_09_00_0-sas0x5000155359566200-lun-0' |
239 |
-+ parser = _parsing.IdPathParse(_parsing.IdPathParsers.PARSERS) |
240 |
-+ result = parser.parse(id_path) |
241 |
-+ assert result == [] |
242 |
- |
243 |
- |
244 |
- class TestDevlinks(object): |
245 |
|
246 |
diff --git a/dev-python/pyudev/pyudev-0.16.1-r1.ebuild b/dev-python/pyudev/pyudev-0.16.1-r1.ebuild |
247 |
deleted file mode 100644 |
248 |
index fbb8061817f..00000000000 |
249 |
--- a/dev-python/pyudev/pyudev-0.16.1-r1.ebuild |
250 |
+++ /dev/null |
251 |
@@ -1,69 +0,0 @@ |
252 |
-# Copyright 1999-2015 Gentoo Foundation |
253 |
-# Distributed under the terms of the GNU General Public License v2 |
254 |
- |
255 |
-EAPI=5 |
256 |
- |
257 |
-PYTHON_COMPAT=( python{2_7,3_4} ) |
258 |
- |
259 |
-inherit distutils-r1 |
260 |
- |
261 |
-DESCRIPTION="Python binding to libudev" |
262 |
-HOMEPAGE="http://pyudev.readthedocs.org https://github.com/pyudev/pyudev" |
263 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
264 |
- |
265 |
-LICENSE="LGPL-2.1" |
266 |
-SLOT="0" |
267 |
-KEYWORDS="amd64 arm ~arm64 x86" |
268 |
-IUSE="pygobject pyqt4 pyside test" |
269 |
- |
270 |
-RDEPEND="virtual/udev |
271 |
- pygobject? ( dev-python/pygobject:2[$(python_gen_usedep 'python2*')] ) |
272 |
- pyqt4? ( dev-python/PyQt4[${PYTHON_USEDEP}] ) |
273 |
- pyside? ( dev-python/pyside[$(python_gen_usedep '!(python3_3)')] )" |
274 |
-DEPEND="${RDEPEND} |
275 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
276 |
- test? ( dev-python/mock[${PYTHON_USEDEP}] |
277 |
- dev-python/pytest[${PYTHON_USEDEP}] )" |
278 |
- |
279 |
-DOCS=( CHANGES.rst README.rst ) |
280 |
- |
281 |
-REQUIRED_USE="pygobject? ( || ( $(python_gen_useflags 'python2*') ) ) |
282 |
- pyside? ( $(python_gen_useflags '!(python3_3)') )" |
283 |
- |
284 |
-python_prepare_all() { |
285 |
- # tests are known to pass then fail on alternate runs |
286 |
- # tests: fix run_path |
287 |
- sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" \ |
288 |
- tests/test_core.py || die |
289 |
- |
290 |
- if ! use pygobject; then |
291 |
- rm pyudev/glib.py || die |
292 |
- sed -i -e "s|[, ]*GlibBinding()||g" \ |
293 |
- tests/test_observer.py || die |
294 |
- fi |
295 |
- if ! use pyqt4; then |
296 |
- rm pyudev/pyqt4.py || die |
297 |
- sed -i -e "s|Qt4Binding('PyQt4')[, ]*||g" \ |
298 |
- tests/test_observer.py || die |
299 |
- fi |
300 |
- if ! use pyside; then |
301 |
- rm pyudev/pyside.py || die |
302 |
- sed -i -e "s|Qt4Binding('PySide')[, ]*||g" \ |
303 |
- tests/test_observer.py || die |
304 |
- fi |
305 |
- if ! use pyqt4 && ! use pyside; then |
306 |
- rm pyudev/_qt_base.py || die |
307 |
- fi |
308 |
- if ! use pyqt4 && ! use pyside && ! use pygobject; then |
309 |
- rm tests/test_observer.py || die |
310 |
- fi |
311 |
- |
312 |
- ewarn "If your PORTAGE_TMPDIR is longer in length then '/var/tmp/'," |
313 |
- ewarn "change it to /var/tmp to ensure tests will pass." |
314 |
- |
315 |
- distutils-r1_python_prepare_all |
316 |
-} |
317 |
- |
318 |
-python_test() { |
319 |
- py.test || die "Tests fail with ${EPYTHON}" |
320 |
-} |
321 |
|
322 |
diff --git a/dev-python/pyudev/pyudev-0.19.0.ebuild b/dev-python/pyudev/pyudev-0.19.0.ebuild |
323 |
deleted file mode 100644 |
324 |
index 68f3a9457e7..00000000000 |
325 |
--- a/dev-python/pyudev/pyudev-0.19.0.ebuild |
326 |
+++ /dev/null |
327 |
@@ -1,62 +0,0 @@ |
328 |
-# Copyright 1999-2016 Gentoo Foundation |
329 |
-# Distributed under the terms of the GNU General Public License v2 |
330 |
- |
331 |
-EAPI=6 |
332 |
- |
333 |
-PYTHON_COMPAT=( python{2_7,3_4} ) |
334 |
- |
335 |
-inherit distutils-r1 |
336 |
- |
337 |
-DESCRIPTION="Python binding to libudev" |
338 |
-HOMEPAGE="http://pyudev.readthedocs.org https://github.com/pyudev/pyudev" |
339 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
340 |
- |
341 |
-LICENSE="LGPL-2.1" |
342 |
-SLOT="0" |
343 |
-KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
344 |
-IUSE="pygobject pyqt4 pyside test" |
345 |
- |
346 |
-RDEPEND="virtual/udev |
347 |
- dev-python/six[${PYTHON_USEDEP}] |
348 |
- pygobject? ( dev-python/pygobject:2[$(python_gen_usedep 'python2*')] ) |
349 |
- pyqt4? ( dev-python/PyQt4[${PYTHON_USEDEP}] ) |
350 |
- pyside? ( dev-python/pyside[$(python_gen_usedep '!(python3_3)')] )" |
351 |
-DEPEND="${RDEPEND} |
352 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
353 |
- test? ( |
354 |
- dev-python/docutils[${PYTHON_USEDEP}] |
355 |
- dev-python/hypothesis[${PYTHON_USEDEP}] |
356 |
- dev-python/mock[${PYTHON_USEDEP}] |
357 |
- >=dev-python/pytest-2.8[${PYTHON_USEDEP}] |
358 |
- )" |
359 |
- |
360 |
-DOCS=( CHANGES.rst README.rst ) |
361 |
- |
362 |
-PATCHES=( |
363 |
- "${FILESDIR}/${P}-Fixes-for-ID_PATH-parsing.patch" |
364 |
- "${FILESDIR}/${P}-skip-non-deterministic-test.patch" |
365 |
-) |
366 |
- |
367 |
-REQUIRED_USE="pygobject? ( || ( $(python_gen_useflags 'python2*') ) ) |
368 |
- pyside? ( $(python_gen_useflags '!(python3_3)') )" |
369 |
- |
370 |
-python_prepare_all() { |
371 |
- if use test; then |
372 |
- ewarn "If your PORTAGE_TMPDIR is longer in length then '/var/tmp/'," |
373 |
- ewarn "change it to /var/tmp to ensure tests will pass." |
374 |
- fi |
375 |
- |
376 |
- # tests are known to pass then fail on alternate runs |
377 |
- # tests: fix run_path |
378 |
- sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" \ |
379 |
- tests/test_core.py || die |
380 |
- |
381 |
- # test needs needs newer dev-cpp/gccxml |
382 |
- rm -f tests/test_libudev.py |
383 |
- |
384 |
- distutils-r1_python_prepare_all |
385 |
-} |
386 |
- |
387 |
-python_test() { |
388 |
- py.test || die "Tests fail with ${EPYTHON}" |
389 |
-} |