Skip to contentSkip to conversation

python3: Fix python3-pyvenv run-time dependency

PATCH Superseded Hugues Kamba 3 participants 4 messages Oct 24, 2018 – Oct 30, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3: Fix python3-pyvenv run-time dependency

Pyvenv is just a small script that uses venv to create virtual environments.
https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments

This patch adds the python3-venv module as a self-contained package which python3-pyvenv must depend on at run-time. This is also good for future-proofing since python3-pyvenv has been deprecated and only python3-venv is now available in Python 3.6.
https://docs.python.org/3/library/venv.html.

Without this patch python3-pyvenv is broken because it is missing the venv module at run-time. This patch specifies the newly created python3-venv as a run-time dependency of python3-pyvenv.

The python3-pyvenv package is removed from the python3 recipe since it is now created from the manifest.

---
 .../python/python3/python3-manifest.json      | 26 +++++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.6.bb |  3 ---
 2 files changed, 26 insertions(+), 3 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +26 -0
index f922561368..68bea36781 100644
@@ -915,6 +915,17 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
         ]
     },
+    "pyvenv": {
+        "summary": "Allows creation of virtual environments so project dependencies can be isolated. Pyvenv has been deprecated in Python 3.6.",
+        "rdepends": [
+            "core",
+            "venv"
+        ],
+        "files": [
+            "${bindir}/pyvenv*"
+        ],
+        "cached": []
+    },
     "resource": {
         "summary": "Python resource control interface",
         "rdepends": [
@@ -1107,6 +1118,21 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc"
         ]
     },
+    "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": [
meta/recipes-devtools/python/python3_3.5.6.bb +0 -3
index 2a4547694a..4413022aa4 100644
@@ -226,9 +226,6 @@ FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
 FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
 FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"
 FILES_libpython3 = "${libdir}/libpython*.so.*"

--
2.18.0

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.

#1 lore raw

If pyvenv is going to disappear, would it be neater to just put all the files into PN-venv and have that RPROVIDE python-pyven for now?

Ross

Quoted 91 lines · Hugues Kamba

Pyvenv is just a small script that uses venv to create virtual environments.
https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments

This patch adds the python3-venv module as a self-contained package which python3-pyvenv must depend on at run-time. This is also good for future-proofing since python3-pyvenv has been deprecated and only python3-venv is now available in Python 3.6.
https://docs.python.org/3/library/venv.html.

Without this patch python3-pyvenv is broken because it is missing the venv module at run-time. This patch specifies the newly created python3-venv as a run-time dependency of python3-pyvenv.

The python3-pyvenv package is removed from the python3 recipe since it is now created from the manifest.

---
 .../python/python3/python3-manifest.json      | 26 +++++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.6.bb |  3 ---
 2 files changed, 26 insertions(+), 3 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +26 -0
index f922561368..68bea36781 100644
@@ -915,6 +915,17 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
         ]
     },
+    "pyvenv": {
+        "summary": "Allows creation of virtual environments so project dependencies can be isolated. Pyvenv has been deprecated in Python 3.6.",
+        "rdepends": [
+            "core",
+            "venv"
+        ],
+        "files": [
+            "${bindir}/pyvenv*"
+        ],
+        "cached": []
+    },
     "resource": {
         "summary": "Python resource control interface",
         "rdepends": [
@@ -1107,6 +1118,21 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc"
         ]
     },
+    "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": [
meta/recipes-devtools/python/python3_3.5.6.bb +0 -4
index 2a4547694a..4413022aa4 100644
@@ -226,9 +226,6 @@ FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
 FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
 FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"
 FILES_libpython3 = "${libdir}/libpython*.so.*"
--

2.18.0

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

#2 lore raw
Quoted 2 lines · Ross

If pyvenv is going to disappear, would it be neater to just put all the files into PN-venv and have that RPROVIDE python-pyven for now?

I also agree with this FWIW.

Cheers,

Richard

#3 lore raw

Hi,

A PATCH v2 for this fix has been submitted providing the pyvenv package from the venv package.

Thanks

Hugues

On 29/10/2018, 14:06, "Richard Purdie" <[email protected]> wrote:

On Mon, 2018-10-29 at 13:07 +0000, Burton, Ross wrote:
> If pyvenv is going to disappear, would it be neater to just put all > the files into PN-venv and have that RPROVIDE python-pyven for now?

I also agree with this FWIW.

Cheers,

Richard

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.