Skip to contentSkip to conversation

python3: Fix python3-pyvenv run-time dependency

PATCH In review Hugues Kamba 2 participants 6 messages Oct 30, 2018 – Oct 31, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

The patch also provides the package python3-pyvenv from the pyhton3-venv package.This is 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.

---
 .../python/python3/python3-manifest.json         | 16 ++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.6.bb    |  4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +16 -0
index f922561368..ef7fa4ecaf 100644
@@ -1107,6 +1107,22 @@
             "${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",
+            "${bindir}/pyvenv*"
+        ],
+        "cached": []
+    },
     "xml": {
         "summary": "Python basic XML support",
         "rdepends": [
meta/recipes-devtools/python/python3_3.5.6.bb +2 -2
index 2a4547694a..31f8eada11 100644
@@ -226,8 +226,8 @@ 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"
+# provide python-pyvenv from python3-venv
+RPROVIDES_${PN}-venv += "${PN}-pyvenv"
 
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"

--
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

Patch looks good, but the commit message contradicts itself a few times. python3-pyvenv is removed, but:

" This patch adds the python3-venv module as a self-contained package which
python3-pyvenv must depend on at run-time." This patch specifies the newly created python3-venv as a run-time dependency of python3-pyvenv."

Ross

Quoted 74 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.

The patch also provides the package python3-pyvenv from the pyhton3-venv package.This is 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.

---
 .../python/python3/python3-manifest.json         | 16 ++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.6.bb    |  4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +16 -0
index f922561368..ef7fa4ecaf 100644
@@ -1107,6 +1107,22 @@
             "${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",
+            "${bindir}/pyvenv*"
+        ],
+        "cached": []
+    },
     "xml": {
         "summary": "Python basic XML support",
         "rdepends": [
meta/recipes-devtools/python/python3_3.5.6.bb +2 -3
index 2a4547694a..31f8eada11 100644
@@ -226,8 +226,8 @@ 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"
+# provide python-pyvenv from python3-venv
+RPROVIDES_${PN}-venv += "${PN}-pyvenv"
 
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"
--

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

#3 lore raw
In reply to Hugues Kamba
Quoted 1 line · Hugues Kamba

I am not sure where you saw the commit message say that pyvenv has been removed.

The python3-pyvenv package is literally being removed:

packages/corei7-64-poky-linux/python3: PACKAGES: removed "python3-pyvenv", added "python3-venv"

Ross

#2 lore raw
In reply to Burton, Ross

Hello Ross,

Thank you for reviewing.

I am not sure where you saw the commit message say that pyvenv has been removed.

What it says about pyvenv is that it is deprecated in python3.6 (to explain why it has been provided via the newly created venv package).

Regards
Hugues

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Burton, Ross <[email protected]>
Sent: Tuesday, October 30, 2018 4:06:40 PM
To: Hugues Kamba
Cc: OE-core
Subject: Re: [OE-core] [PATCH v2] python3: Fix python3-pyvenv run-time dependency

Patch looks good, but the commit message contradicts itself a few times. python3-pyvenv is removed, but:

" This patch adds the python3-venv module as a self-contained package which
python3-pyvenv must depend on at run-time." This patch specifies the newly created python3-venv as a run-time dependency of python3-pyvenv."

Ross

Quoted 68 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.

The patch also provides the package python3-pyvenv from the pyhton3-venv package.This is 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.

---
 .../python/python3/python3-manifest.json         | 16 ++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.6.bb    |  4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +16 -0
index f922561368..ef7fa4ecaf 100644
@@ -1107,6 +1107,22 @@
             "${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",
+            "${bindir}/pyvenv*"
+        ],
+        "cached": []
+    },
     "xml": {
         "summary": "Python basic XML support",
         "rdepends": [
meta/recipes-devtools/python/python3_3.5.6.bb +2 -3
index 2a4547694a..31f8eada11 100644
@@ -226,8 +226,8 @@ 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"
+# provide python-pyvenv from python3-venv
+RPROVIDES_${PN}-venv += "${PN}-pyvenv"
 
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"
--

2.18.0

Quoted 6 lines

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.

#4 lore raw
In reply to Burton, Ross

I am still new to Yocto but my understanding of adding pyvenv to venv's RPROVIDES is that python3-pyvenv is available (albeit as an alias of python3-venv). I therefore have not removed the possibility for one to choose to include the pyvenv package instead of the new venv package.
In fact, I tested building with python3-pyvenv included.
Which parts of the conmit message are contradicting according to you?

Hugues

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Burton, Ross <[email protected]>
Sent: Tuesday, October 30, 2018 4:18:37 PM
To: Hugues Kamba
Cc: OE-core
Subject: Re: [OE-core] [PATCH v2] python3: Fix python3-pyvenv run-time dependency

Quoted 1 line · Hugues Kamba

I am not sure where you saw the commit message say that pyvenv has been removed.

The python3-pyvenv package is literally being removed:

packages/corei7-64-poky-linux/python3: PACKAGES: removed "python3-pyvenv", added "python3-venv"

Ross
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.

#5 lore raw
Quoted 4 lines · Hugues Kamba

I am still new to Yocto but my understanding of adding pyvenv to venv's RPROVIDES is that python3-pyvenv is available (albeit as an alias of python3-venv). I therefore have not removed the possibility for one to choose to include the pyvenv package instead of the new venv package.
In fact, I tested building with python3-pyvenv included.
Which parts of the conmit message are contradicting according to you?

" This patch adds the python3-venv module as a self-contained package which
python3-pyvenv must depend on at run-time."

python3-pyvenv does't exist.

I'd simply rewrite the message along the follow lines:

python3: add python3-venv package
Package both the venv module and the pyvenv binaries into the
python3-venv package.
Add python3-pyvenv RPROVIDES to python3-venv for backward compatibility.

Ross