diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pyudev |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pyudev')
-rw-r--r-- | dev-python/pyudev/Manifest | 8 | ||||
-rw-r--r-- | dev-python/pyudev/files/pyudev-0.19.0-skip-non-deterministic-test.patch | 78 | ||||
-rw-r--r-- | dev-python/pyudev/metadata.xml | 22 | ||||
-rw-r--r-- | dev-python/pyudev/pyudev-0.20.0.ebuild | 61 | ||||
-rw-r--r-- | dev-python/pyudev/pyudev-0.21.0.ebuild | 56 |
5 files changed, 225 insertions, 0 deletions
diff --git a/dev-python/pyudev/Manifest b/dev-python/pyudev/Manifest new file mode 100644 index 000000000000..a7085755c95f --- /dev/null +++ b/dev-python/pyudev/Manifest @@ -0,0 +1,8 @@ +AUX pyudev-0.19.0-skip-non-deterministic-test.patch 3497 SHA256 23234de419e51950247f189a848df93ed47ff1c4846fee108abaa5ab8ec9adca SHA512 23c305242e4df0bd0d4cde458ca1ee129bef36f98f5b7c3b341c4866b7f21a51ffaf07aa56901aeb67ccb59a4ed6548d4799ae2c519e359b627b29e722119a4d WHIRLPOOL a0cd36fbbadd0008e48953b4a2fb42cee1899b58d56c28e6ea712fa7b47e66a11abb2966a0dc8375acf590d813818be4016a4d0e69d6edaed0e903b2a44554ed +DIST pyudev-0.20.0.tar.gz 93217 SHA256 14d85bc9611dbf798732996cb7107858f58a3a1b9d246e4063c7a20ade65842a SHA512 e86a776a2b6d29f206cdd0057c6f9b1e705d981ec8c2de49259887647856531af68238b80751102a3ffc8cea6f234cc520d62c8bc2da686e453ed010da3ebb02 WHIRLPOOL 8344c668c1cc2e7971a67d0e628e3ce96254648ad06b48f260dd4ee54e3e205e533e59b692169b38dd656c08d8cd615d0c7c518b5c2a785553b8c6468e70520c +DIST pyudev-0.21.0.tar.gz 89469 SHA256 094b7a100150114748aaa3b70663485dd360457a709bfaaafe5a977371033f2b SHA512 ba5b6156768b65b9655d809b14378b01173643781b9c4017271e880cdfed442c44ac49eb26c970e4275b820e01678e3001870591fccf88dc713ec941e2b85d11 WHIRLPOOL e69865d8b33ab103e0ff6371df4e05617c3907cbfc98d508285c7464065ccace6dc7d4e963035e19392e6ab39881281e684ddd4f7765fc599874411204ea825b +EBUILD pyudev-0.20.0.ebuild 1667 SHA256 fc299cdcb278821d5cee6197f13252ec5817bc729f70deb6e181910c067a52fd SHA512 592c4d063140a2946bd029d1a6df488e839b9ea75b506266f21f1d5d394487db5e41a5b6d0d3f06ae96472982affb342de65d0f7e810a94d9a895447369dce2d WHIRLPOOL 781e03182510eecf10317e7114c755dea352bf76e0491a0a32e83ffe1440c65edd34fc0fa512d9de4880b39c0b61ba65f5a9c7b0dba077995e361ae309d5faee +EBUILD pyudev-0.21.0.ebuild 1576 SHA256 431546861b91dc6ef77a8be0c8fd41738adb5fbf7243465bebf26764c630d198 SHA512 c3fe3e8221ad9945d3f5de545ac29ef2ab3f9910f998368da18fa00c6bd1095bee8b53b5a39726591b5de908c51288f1d0b70e7139e28d34260fd88540018c15 WHIRLPOOL 5eaa71bc0ba067a080bebfbc64780dc705f779a2d804598f9bfaae5abb57a978c58304bc73a00a1105f29e767ed12ac7f8dd77ac937d4268d41d903e2f0aac25 +MISC ChangeLog 3330 SHA256 ee079ba020b4d49d9a77ec912393c6584afbef3596d21ab2382f1bf13d37d94c SHA512 a97a48b1dc13a46268a1fb8f356734cf8b9a52eddb6600c46e7e3f2be94f09ccfcee613b27c28d040ba0bcf8ba692ef663fae63461af97d12bd94f13b7d867bf WHIRLPOOL 12945286dc0db29ca33f193d068453dd8fb6429a93270eaa6a8b802f17989251dd671a83fca91ec2bb89003c0eab9048bde8617c5dc18fcb7496faceb1b35c9f +MISC ChangeLog-2015 4328 SHA256 85cf75a6b238c78b5d9a6e8dafe90da22bbcc423d21df631354662cf7a58038c SHA512 4f592b66eb0754a17dd28e60be6f8c232359c3cbf9c2b0459747e38bdc03b86324fa863458f0e2bb477b09d1721f77fe80ec82916e8928d650ccc9e470285194 WHIRLPOOL faaf9576962b54c20d66e9214bc65828df35d63e7b0ef0d7f6ae282efd51fc84a0833c0b63989ce194e5c4b879789058aacb704d083a58268bd2a07fc822da6a +MISC metadata.xml 754 SHA256 83072935dc9c93cf7caa54b8794b679ab7f4bfdfb6ef8bc4badec73563091204 SHA512 e0ed712734759c1710ea8bd2cd9ba1c39801a4355da7ec53a5cc0cec2ac375ee19ca557fb3a13895a2ea7d6ce56b216501106e3fd216281a4f60776aca020170 WHIRLPOOL c9a742e3ddb6ba3197cc0bb2b332d24bedad9d43657ba866bfe2d954dd857cd6c67f9ca0d3711fa93e65f590226a5b6bdc001917dead58ff457e175a6e8f594c diff --git a/dev-python/pyudev/files/pyudev-0.19.0-skip-non-deterministic-test.patch b/dev-python/pyudev/files/pyudev-0.19.0-skip-non-deterministic-test.patch new file mode 100644 index 000000000000..268d2bdf1b4c --- /dev/null +++ b/dev-python/pyudev/files/pyudev-0.19.0-skip-non-deterministic-test.patch @@ -0,0 +1,78 @@ +diff --git a/tests/_device_tests/_attributes_tests.py b/tests/_device_tests/_attributes_tests.py +index 54d8ae6..84e26c3 100644 +--- a/tests/_device_tests/_attributes_tests.py ++++ b/tests/_device_tests/_attributes_tests.py +@@ -88,6 +88,7 @@ def test_non_iterable(self, a_device): + with pytest.raises(TypeError): + a_device.attributes['key'] + ++ @pytest.mark.skipif(True, reason='Non-deterministic') + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_asstring(self, a_context, device_datum): +@@ -99,6 +100,7 @@ def test_asstring(self, a_context, device_datum): + assert is_unicode_string(device.attributes.asstring(key)) + assert device.attributes.asstring(key) == value + ++ @pytest.mark.skipif(True, reason='Non-deterministic') + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_asint(self, a_context, device_datum): +@@ -115,6 +117,7 @@ def test_asint(self, a_context, device_datum): + else: + assert device.attributes.asint(key) == value + ++ @pytest.mark.skipif(True, reason='Non-deterministic') + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_asbool(self, a_context, device_datum): +diff --git a/tests/_device_tests/_device_tests.py b/tests/_device_tests/_device_tests.py +index 92a767d..175c611 100644 +--- a/tests/_device_tests/_device_tests.py ++++ b/tests/_device_tests/_device_tests.py +@@ -378,6 +378,7 @@ def test_getitem_nonexisting(self, a_device): + a_device['a non-existing property'] + assert str(excinfo.value) == repr('a non-existing property') + ++ @pytest.mark.skipif(True, reason='Non-deterministic') + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_asint(self, a_context, device_datum): +@@ -391,6 +392,7 @@ def test_asint(self, a_context, device_datum): + else: + assert device.asint(property) == value + ++ @pytest.mark.skipif(True, reason='Non-deterministic') + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA)) + @settings(max_examples=5) + def test_asbool(self, a_context, device_datum): +diff --git a/tests/_device_tests/_devices_tests.py b/tests/_device_tests/_devices_tests.py +index 8eb8069..b80e550 100644 +--- a/tests/_device_tests/_devices_tests.py ++++ b/tests/_device_tests/_devices_tests.py +@@ -189,8 +189,8 @@ def test_from_device_file(self, a_context, device_datum): + + _device_data = [d for d in _DEVICE_DATA if list(d.device_links)] + @pytest.mark.skipif( +- len(_device_data) == 0, +- reason='no device with a device node' ++ True, ++ reason='non deterministic' + ) + @given(_CONTEXT_STRATEGY, strategies.sampled_from(_device_data)) + @settings(max_examples=5, min_satisfying_examples=1) +diff --git a/tests/test_discover.py b/tests/test_discover.py +index dd336d5..c410a64 100644 +--- a/tests/test_discover.py ++++ b/tests/test_discover.py +@@ -155,8 +155,8 @@ def test_name(self, a_device): + + _devices = [d for d in _DEVICES if list(d.device_links)] + @pytest.mark.skipif( +- len(_devices) == 0, +- reason="no device with device links" ++ True, ++ reason='Non-deterministic' + ) + @given(strategies.sampled_from(_devices)) + @settings(max_examples=NUM_TESTS, min_satisfying_examples=1) diff --git a/dev-python/pyudev/metadata.xml b/dev-python/pyudev/metadata.xml new file mode 100644 index 000000000000..f42881a0924b --- /dev/null +++ b/dev-python/pyudev/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</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 bindings</flag> + <flag name="qt4">Install PyQt4 bindings</flag> + <flag name="qt5">Install PyQt5 bindings</flag> + <flag name="pyside">Install PySide bindings</flag> + </use> + <upstream> + <remote-id type="pypi">pyudev</remote-id> + <remote-id type="github">pyudev/pyudev</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/pyudev/pyudev-0.20.0.ebuild b/dev-python/pyudev/pyudev-0.20.0.ebuild new file mode 100644 index 000000000000..0cd4b8380612 --- /dev/null +++ b/dev-python/pyudev/pyudev-0.20.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit distutils-r1 + +DESCRIPTION="Python binding to libudev" +HOMEPAGE="http://pyudev.readthedocs.org https://github.com/pyudev/pyudev" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 arm ~arm64 x86" +IUSE="pygobject qt4 pyside test" + +RDEPEND="virtual/udev + dev-python/six[${PYTHON_USEDEP}] + pygobject? ( dev-python/pygobject:2[$(python_gen_usedep 'python2*')] ) + qt4? ( dev-python/PyQt4[${PYTHON_USEDEP}] ) + pyside? ( dev-python/pyside[$(python_gen_usedep '!(python3_3)')] )" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + >=dev-python/pytest-2.8[${PYTHON_USEDEP}] + )" + +DOCS=( CHANGES.rst README.rst ) + +PATCHES=( + "${FILESDIR}/${PN}-0.19.0-skip-non-deterministic-test.patch" +) + +REQUIRED_USE="pygobject? ( || ( $(python_gen_useflags 'python2*') ) ) + pyside? ( || ( $(python_gen_useflags '!(python3_3)') ) )" + +python_prepare_all() { + if use test; then + ewarn "If your PORTAGE_TMPDIR is longer in length then '/var/tmp/'," + ewarn "change it to /var/tmp to ensure tests will pass." + fi + + # tests are known to pass then fail on alternate runs + # tests: fix run_path + sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" \ + tests/test_core.py || die + + # test needs needs newer dev-cpp/gccxml + rm -f tests/test_libudev.py + + distutils-r1_python_prepare_all +} + +python_test() { + py.test || die "Tests fail with ${EPYTHON}" +} diff --git a/dev-python/pyudev/pyudev-0.21.0.ebuild b/dev-python/pyudev/pyudev-0.21.0.ebuild new file mode 100644 index 000000000000..ac3b0ab16602 --- /dev/null +++ b/dev-python/pyudev/pyudev-0.21.0.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 + +DESCRIPTION="Python binding to libudev" +HOMEPAGE="http://pyudev.readthedocs.org https://github.com/pyudev/pyudev" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="pygobject qt4 qt5 pyside test" +REQUIRED_USE="pygobject? ( || ( $(python_gen_useflags 'python2*') ) )" + +RDEPEND="virtual/udev + dev-python/six[${PYTHON_USEDEP}] + pygobject? ( dev-python/pygobject:2[$(python_gen_usedep 'python2*')] ) + qt4? ( dev-python/PyQt4[${PYTHON_USEDEP}] ) + qt5? ( dev-python/PyQt5[${PYTHON_USEDEP}] ) + pyside? ( dev-python/pyside[${PYTHON_USEDEP}] )" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + >=dev-python/pytest-2.8[${PYTHON_USEDEP}] + )" + +DOCS=( CHANGES.rst README.rst ) + +PATCHES=( + "${FILESDIR}/${PN}-0.19.0-skip-non-deterministic-test.patch" +) + +python_prepare_all() { + if use test; then + ewarn "If your PORTAGE_TMPDIR is longer in length then '/var/tmp/'," + ewarn "change it to /var/tmp to ensure tests will pass." + fi + + # tests are known to pass then fail on alternate runs + # tests: fix run_path + sed -i -e "s|== \('/run/udev'\)|in (\1,'/dev/.udev')|g" \ + tests/test_core.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + py.test -v || die "Tests fail with ${EPYTHON}" +} |