[OE-core] Missing venv module in Python 3

Hugues Kamba Hugues.Kamba at arm.com
Fri Oct 19 10:08:52 UTC 2018


Hi Alejandro,


Thank you for your suggestion.


The following has been added to a python3_%.bbapend:

# Add missing venv module dependency.
FILES_${PN}-pyvenv += "${libdir}/${PYTHON_MAJMIN}/venv"


However, it is not quite obvious how to successfully run the create_manifest3.py script.
Attempts were made to run it with "python3 create_manifest3.py python3.5" but it complains about an undefined variable (nativelibfolder).
I also tried to run it using "bitbake pyhton -c create_manifest3.py" as specified in the docstring but execution fails because of missing tasks (no do_..).


Could you or others on the mailing list, provide some guidance on how to go about running (arguments, etc..) the create_manifest3.py script.


[cid:bbaed11e-d9b2-456f-bd15-200669ad237e]

Hugues Kamba | Senior Software Engineer
hugues.kamba at arm.com<mailto:sandi.shannon at arm.com>
CPC1, Capital Park, Cambridge Road, Fulbourn, CB21 5XE, UK
Tel: (+44)1223 400400
Visit the new ARM Connected Community<https://urldefense.proofpoint.com/v2/url?u=http-3A__community.arm.com_welcome&d=DwMFAg&c=bKNseOHsszsRCtLFfd6XtA&r=h1JGsEgvfYBPUFak8b6Fs-oV6irVsuuFc4RBESlsTFE&m=N8x4mnijl-wwLmtz3tbzVbe9R-QRW9bVZHfjOv3YY0o&s=FTtAextvaqUli74ujYjbDxp7jK9aaA6G7NOsVfryuyw&e=>



________________________________
From: Alejandro Enedino Hernandez Samaniego <aehs29 at gmail.com>
Sent: 18 October 2018 19:18
To: Burton, Ross
Cc: Jonathan Haigh; OE-core; Jeremy Johnson; Hugues Kamba
Subject: Re: [OE-core] Missing venv module in Python 3

Hello folks,

On Thu, Oct 18, 2018, 3:34 PM Burton, Ross <ross.burton at intel.com<mailto:ross.burton at intel.com>> wrote:
On Thu, 18 Oct 2018 at 16:19, Jonathan Haigh <Jonathan.Haigh at arm.com<mailto:Jonathan.Haigh at arm.com>> wrote:
> The venv package (https://docs.python.org/3/library/venv.html) itself is missing although its source is available within Python 3.5 (https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz). As mentioned earlier, it seems the issue is because there is no entry in the manifest from which the various Python 3 modules are created (https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/python3-manifest.json).
>
> The manifest is generated from https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/create_manifest3.py, and it does not seem obvious to me how to go about correctly adding a new module to the manifest, using create_manifest3.py or otherwise.

The script itself should get the venv dependency automatically (my guess is that this isn't getting detected by the script because the module itself its coming from a directory) but I'd have to debug what is exactly happening, although I don't have access to my computer at the moment.

An easy fix (for now) is to add the

/usr/lib/python3.5/venv/

Path to the manifest on the FILES for the pyenv module.

After that running the create_manifest task should get its dependencies correctly and update the manifest so it can be pushed to the repo.

Cheers,

Alejandro



Ah, right.

In that case:

$ oe-pkgdata-util find-path */*venv*py
python3-tests: /usr/lib/python3.5/test/test_venv.py
python3-misc: /usr/lib/python3.5/venv/__main__.py
python3-misc: /usr/lib/python3.5/venv/__init__.py

The files are in the python3-misc package, which is the fallback for
everything which isn't explicitly put into another package.  I'd say
the best fix for this would be to edit the manifest so the venv module
goes into the python3-pyvenv package too.

Ross
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181019/00380546/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-3v34lh5k.png
Type: image/png
Size: 2551 bytes
Desc: Outlook-3v34lh5k.png
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181019/00380546/attachment-0002.png>


More information about the Openembedded-core mailing list