[OE-core] [PATCH] python3-subunit: ensure runtime dependencies are present

Trevor Gamblin Trevor.Gamblin at windriver.com
Mon Sep 23 15:52:38 UTC 2019


From: Trevor Gamblin <trevor.gamblin at windriver.com>

Without access to unittest, subunit cannot be imported in python3:

    root at 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.

Signed-off-by: Trevor Gamblin <trevor.gamblin at windriver.com>
---
 meta/recipes-devtools/python/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 b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
index 2ece4451df..55066e2d0f 100644
--- a/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
+++ b/meta/recipes-devtools/python/python3-subunit_1.3.0.bb
@@ -1,2 +1,4 @@
 inherit setuptools3
 require python-subunit.inc
+
+RDEPENDS_${PN} = " python3-testtools"
-- 
2.21.0



More information about the Openembedded-core mailing list