[OE-core] PATCH: Fixing python3-pyvenv and adding python3-venv

Hugues Kamba Hugues.Kamba at arm.com
Mon Oct 22 22:47:44 UTC 2018


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-samaniego at xilinx.com>
Sent: 22 October 2018 23:17:26
To: Hugues Kamba; openembedded-core at lists.openembedded.org
Cc: Diego Russo; Jeremy Johnson; aehs29 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181022/762f0411/attachment-0001.html>


More information about the Openembedded-core mailing list