[OE-core] [PATCH] python3-subunit: ensure runtime dependencies are present
Trevor Gamblin
trevor.gamblin at windriver.com
Mon Sep 23 18:22:08 UTC 2019
On 9/23/19 2:06 PM, Tim Orling wrote:
>
>
> On Mon, Sep 23, 2019 at 8:53 AM Trevor Gamblin
> <Trevor.Gamblin at windriver.com <mailto:Trevor.Gamblin at windriver.com>>
> wrote:
>
> From: Trevor Gamblin <trevor.gamblin at windriver.com
> <mailto: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.
>
>
> 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 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
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 <trevor.gamblin at windriver.com
> <mailto:trevor.gamblin at windriver.com>>
> ---
> 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
> Openembedded-core at lists.openembedded.org
> <mailto:Openembedded-core at lists.openembedded.org>
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190923/d1ac833f/attachment-0001.html>
More information about the Openembedded-core
mailing list