Hi Ross,
Thank you for you prompt reply.

Apologies if I was not clear enough in my previous message.

python3-pyvenv is indeed a package that gets built with python3. However, 
pyvenv is just a short script that imports the venv module. Including the 
python3-pyvenv package does not solve the issue as the creation of a virtual 
environment using "python3 -m venv my_env" or "pyvenv my_env" results in a 
error about the missing venv module.

See the entire content of pyvenv:
---------------------------------------------------
#! /usr/bin/python3.5
if __name__ == '__main__':
    import sys
    rc = 1
    try:
        import venv
        venv.main()
        rc = 0
    except Exception as e:
        print('Error: %s' % e, file=sys.stderr)
    sys.exit(rc)
----------------------------------------------------

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.

Can you, or others on the mailing list, provide some guidance on how to go 
about adding the venv module to the manifest?

Regards,

Hugues/Jonathan


________________________________
From: Burton, Ross <[email protected]>
Sent: 18 October 2018 14:56
To: Jonathan Haigh
Cc: OE-core; Jeremy Johnson; Alejandro Enedino Hernandez Samaniego; Hugues Kamba
Subject: Re: [OE-core] Missing venv module in Python 3

venv is packaged in python3-pyvenv.  Patches welcome to get that
installed out of the box.

Ross
On Thu, 18 Oct 2018 at 14:35, Jonathan Haigh <[email protected]> wrote:
>
> Hello,
>
> I have noticed that the venv module is not available with Python 3 in Yocto.
> This is possibly because there is no entry for it in 
> openembedded-core/meta/recipes-devtools/python/python3/python3-manifest.json
>
> Could  you please provide guidance or a fix to make the module available?
>
> Thank you
>
> Jonathan Haigh on behalf of Hugues Kamba
> 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.
> --
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
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.
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to