On 9/23/19 2:06 PM, Tim Orling wrote:
On Mon, Sep 23, 2019 at 8:53 AM Trevor Gamblin
<[email protected] <mailto:[email protected]>>
wrote:
From: Trevor Gamblin <[email protected]
<mailto:[email protected]>>
Without access to unittest, subunit cannot be imported in python3:
root@qemux86-64:~# python3
Python 3.7.4 (default, Sep 20 2019, 13:38:31)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more
information.
>>> import subunit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/subunit/__init__.py",
line 123, in <module>
import unittest
ModuleNotFoundError: No module named 'unittest'
>>>
Adding python3-testtools to python3-subunit's RDEPENDS fixes the
issue. This also implicitly provides the functionality found in
the python3-extras module.
If we literally only need unittest, then RDEPENDS on -testtools is
overkill. We only need the -unittest submodule:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python3/python3-manifest.json#n1158
After running a quick test with python3-unittest and python3-extras as
the RDEPENDS:
root@qemux86-64:~# python3
Python 3.7.4 (default, Sep 20 2019, 13:38:31)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subunit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/subunit/__init__.py", line
130, in <module>
from testtools import content, content_type,
ExtendedToOriginalDecorator
ModuleNotFoundError: No module named 'testtools'
It does require testtools, but the errors being thrown were for the
unittest and extras modules (both included with testtools).
Signed-off-by: Trevor Gamblin <[email protected]
<mailto:[email protected]>>
---
meta/recipes-devtools/python/python3-subunit_1.3.0.bb
<http://python3-subunit_1.3.0.bb> | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
<http://python3-subunit_1.3.0.bb>
b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
<http://python3-subunit_1.3.0.bb>
index 2ece4451df..55066e2d0f 100644
--- a/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
<http://python3-subunit_1.3.0.bb>
+++ b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
<http://python3-subunit_1.3.0.bb>
@@ -1,2 +1,4 @@
inherit setuptools3
require python-subunit.inc
+
+RDEPENDS_${PN} = " python3-testtools"
--
2.21.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
<mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core