Hello Huges,
On 10/23/2018 12:12 AM, Hugues Kamba wrote:
Hi Alenjandro,
More information here:
https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments
What I am proposing is also a good idea for when python 3.6 is
available in Yocto.
With Python 3.5 one can create virtual environment by including
python3-pyvenv OR python3-venv+python3-runpy.
With Python 3.6 one will only be able to create virtual environments
with python3-venv+python3-runpy.
I hope I made it a bit clearer now.
I do understand what you are saying, they are two different things, and
while the purpose of the manifest
is to provide more granularity on what goes or doesn't go on an image,
we still have to be careful on
how we package things, in this case I simply don't see any reason why we
would need two separate packages,
specially because nothing else RDEPENDS on venv , and I don't see the
point in creating a package that only
contains a single binary.
I believe it makes more sense to package them both together in a single
package, we are upgrading to python 3.7 soon,
and I believe having a single vnenv package should work for that too.
Cheers,
Alejandro
Thanks!
Hugues
------------------------------------------------------------------------
*From:* Hugues Kamba
*Sent:* 22 October 2018 23:47:44
*To:* Alejandro Hernandez; openembedded-core@lists.openembedded.org
*Cc:* Diego Russo; Jeremy Johnson; aeh...@gmail.com
*Subject:* Re: [OE-core] PATCH: Fixing python3-pyvenv and adding
python3-venv
Hi Alejandro,
I submitted the patch using git send-email since that email.
pyvenv and venv are not the same. pyvenv depends on venv to run.
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) /
----------------------------------------------------
As you can see, pyvenv depends on venv to run. Because it is confusing
to have both pyvenv and venv; pyvenv has been deprecated in python 3.6.
They should be two seperate packages not a single because they are
different things. Read here for more information:
https://docs.python.org/3/library/venv.html
I do not understand what you mean by the cached files as I did not add
it. After modifying the JSON I ran create_manifest3.py which added
that, the rdepends content on venv was also added automatically after
runny that script. My changes are only adding pyvenv and venv in the JSON.
I will submit another patch which removes pyvenv in the python3 recipe.
Regards,
Hugues
------------------------------------------------------------------------
*From:* Alejandro Hernandez
<alejandro.enedino.hernandez-samani...@xilinx.com>
*Sent:* 22 October 2018 23:17:26
*To:* Hugues Kamba; openembedded-core@lists.openembedded.org
*Cc:* Diego Russo; Jeremy Johnson; aeh...@gmail.com
*Subject:* Re: [OE-core] PATCH: Fixing python3-pyvenv and adding
python3-venv
Hello Huges,
I cannot reply inline because you sent the patch as an attachment,
please send it using git send-email next time.
Also, something doesnt add up here:
+ "pyvenv": {
+ "summary": "Allow you to create virtual environments so we can isolate our
project dependencies. Deprecated in Python 3.6",
+ "rdepends": [
+ "core",
+ "venv"
This doesnt make sense, since you are saying that the python3-pyvenv package
depends on python3-venv?, shouldnt they be the same package?
+ ],
+ "files": [
+ "${bindir}/pyvenv*"
Again, this should probably on one single package.
+ ],
+ "cached": []
+ },
"resource": {
"summary": "Python resource control interface",
"rdepends": [
@@ -1107,6 +1118,21 @@
"${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc"
]
This is wrong because, cached files shouldnt be on rdepends.
Everything from there to the bottom is probably ok.
},
+ "venv": {
+ "summary": "Provides support for creating lightweight virtual environments
with their own site directories, optionally isolated from system site directories",
+ "rdepends": [
+ "compression",
+ "core",
+ "logging",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/venv"
+ ],
+ "cached": []
+ },
"xml": {
"summary": "Python basic XML support",
"rdepends": [
Also, this patch is missing the changes to the python3 recipe file
where the python3-pyvenv package was being previously created, if were
now doing it through the manifest, then we dont need it in the recipe.
Thanks!
Alejandro
On 10/22/2018 11:48 AM, Hugues Kamba wrote:
Dear All,
As it currently is, python3-pyvenv is broken because it is missing
the venv module run-time dependency.
The patch I am submitting is to add the venv module dependency to
python3-pyvenv.
The dependency has been added using the newly added venv package
(python3-venv).
The python3-venv package has been added for future proofing since
pyvenv has been deprecated in Python 3.6 and creation of virtual
environment is done using the venv module directly (i.e python3 -m
venv my_venv).
Regards,
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.
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
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core