<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">Hi Ross,</span></font></span></font></div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">Thank you for you prompt reply.</span></font></span></font>
</div>
<div>
<div style="margin:0 0 0 36pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font></div>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">Apologies if I was not clear enough in my previous message.</span></font></span></font>
</div>
<div>
<div style="margin:0 0 0 36pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font></div>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">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.</span></font></span></font>
</div>
<div>
<div style="margin:0 0 0 36pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font></div>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">See the entire content of pyvenv:</span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i>---------------------------------------------------</i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i>#! /usr/bin/python3.5 </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i>if __name__ == '__main__': </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> import sys </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> rc = 1 </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> try: </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> import venv </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> venv.main() </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> rc = 0 </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> except Exception as e: </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> print('Error: %s' % e, file=sys.stderr) </i></span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="2" color="black"><span style="font-size:10pt;"><i> sys.exit(rc)
</i></span></font><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">----------------------------------------------------</span></font></span></font>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"><br>
</span></font></span></font></div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">
<div>Th<font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">e venv package (</span></font><a href="https://docs.python.org/3/library/venv.html" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable"><font size="3"><span style="font-size:12pt;">https://docs.python.org/3/library/venv.html</span></font></a><font size="3" color="black"><span style="font-size:12pt;">) itself
is missing although its source is available within Python 3.5 (</span></font><a href="https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable"><font size="3"><span style="font-size:12pt;">https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz</span></font></a><font size="3" color="black"><span style="font-size:12pt;">).
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 (</span></font><a href="https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/python3-manifest.json" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable"><font size="3"><span style="font-size:12pt;">https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/python3-manifest.json</span></font></a><font size="3" color="black"><span style="font-size:12pt;">).</span></font></span></font></div>
<br>
</span></font></span></font></span></font></span></font></div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">The
manifest is generated from</span></font><a href="https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/create_manifest3.py" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable"><font size="3"><span style="font-size:12pt;">
https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/python/python3/create_manifest3.py</span></font></a></span></font>, 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.</span></font></span></font></div>
<font size="3"><font face="Calibri,sans-serif"><br>
</font></font></div>
<font size="3"><font face="Calibri,sans-serif">Can you</font></font><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">, or others on the mailing list, provide some guidance on how
to go about adding the venv module to the manifest?<br>
</span></font></span></font>
<div>
<div style="margin:0 0 0 36pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font></div>
</div>
<div><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">Regards,</span></font></span></font>
</div>
<div>
<div style="margin:0 0 0 36pt;"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;"> </span></font></span></font></div>
</div>
<font size="2" face="Calibri,sans-serif"><span style="font-size:11pt;"><font size="3" color="black"><span style="font-size:12pt;">Hugues/Jonathan</span></font></span></font><br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Burton, Ross <ross.burton@intel.com><br>
<b>Sent:</b> 18 October 2018 14:56<br>
<b>To:</b> Jonathan Haigh<br>
<b>Cc:</b> OE-core; Jeremy Johnson; Alejandro Enedino Hernandez Samaniego; Hugues Kamba<br>
<b>Subject:</b> Re: [OE-core] Missing venv module in Python 3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">venv is packaged in python3-pyvenv. Patches welcome to get that<br>
installed out of the box.<br>
<br>
Ross<br>
On Thu, 18 Oct 2018 at 14:35, Jonathan Haigh <Jonathan.Haigh@arm.com> wrote:<br>
><br>
> Hello,<br>
><br>
> I have noticed that the venv module is not available with Python 3 in Yocto.<br>
> This is possibly because there is no entry for it in openembedded-core/meta/recipes-devtools/python/python3/python3-manifest.json<br>
><br>
> Could you please provide guidance or a fix to make the module available?<br>
><br>
> Thank you<br>
><br>
> Jonathan Haigh on behalf of Hugues Kamba<br>
> 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.<br>
> --<br>
> _______________________________________________<br>
> Openembedded-core mailing list<br>
> Openembedded-core@lists.openembedded.org<br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</div>
</span></font></div>
</div>
</div>
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.
</body>
</html>