Skip to contentSkip to conversation

python3-packaging: add -native version

PATCH In review Ryan Rowe 2 participants 6 messages Jul 16, 2020 – Jul 21, 2020

lore
Share & tools
lore

Ryan Rowe

author
#0 lore raw

PATCH 1/2 python3-packaging: add -native version

---
 meta-python/recipes-devtools/python/python3-packaging_20.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-packaging_20.4.bb +2 -0
index 0f78fd016..c75707e69 100644
@@ -8,5 +8,7 @@ SRC_URI[sha256sum] = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d55
 
 inherit pypi setuptools3
 
+BBCLASSEXTEND = "native"
+
 DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
 RDEPENDS_${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-pyparsing"
Signature · 1 line
2.17.2 (Apple Git-113)
author
#1 lore raw

PATCH 2/2 python3-pint: add missing python3-packaging dep

---
 meta-python/recipes-devtools/python/python3-pint_0.14.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python3-pint_0.14.bb +4 -0
index 8e1630476..ab8b4d74d 100644
@@ -21,6 +21,10 @@ SRC_URI += " \
 	file://run-ptest \
 "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-packaging \
+"
+
 RDEPENDS_${PN}-ptest += " \
 	${PYTHON_PN}-pytest \
 "
Signature · 1 line
2.17.2 (Apple Git-113)
#2 lore raw

Re: [oe] [meta-python][PATCH 2/2] python3-pint: add missing python3-packaging dep

Quoted 1 line · Ryan Rowe

I get the following when I build an image and test the import:

Quoted 1 line
Quoted 1 line
Quoted 1 line

import pint

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pint/__init__.py", line 28, in <module> from .registry import LazyRegistry, UnitRegistry
  File "/usr/lib/python3.8/site-packages/pint/registry.py", line 49, in <module> import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Would you mind re-submitting this patch and adding ${PYTHON_PN}-setuptools to the RDEPENDS?

Trevor

Quoted 21 lines
---
  meta-python/recipes-devtools/python/python3-pint_0.14.bb | 4 ++++
  1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python3-pint_0.14.bb +4 -0
index 8e1630476..ab8b4d74d 100644
@@ -21,6 +21,10 @@ SRC_URI += " \
  	file://run-ptest \
  "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-packaging \
+"
+
  RDEPENDS_${PN}-ptest += " \
  	${PYTHON_PN}-pytest \
  "
Acked-by on v1 2/2
#3 lore raw

Re: [oe] [meta-python][PATCH 2/2] python3-pint: add missing python3-packaging dep

In reply to Ryan Rowe
Quoted 1 line · Ryan Rowe

Needs python3-setuptools and python3-packaging in RDEPENDS to import cleanly. I'm going to send a follow-up patch for that shortly:

Quoted 1 line
Quoted 1 line
Quoted 1 line

import pint

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pint/__init__.py", line 28, in <module> from .registry import LazyRegistry, UnitRegistry
  File "/usr/lib/python3.8/site-packages/pint/registry.py", line 49, in <module> import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Quoted 21 lines
---
  meta-python/recipes-devtools/python/python3-pint_0.14.bb | 4 ++++
  1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python3-pint_0.14.bb +4 -0
index 8e1630476..ab8b4d74d 100644
@@ -21,6 +21,10 @@ SRC_URI += " \
  	file://run-ptest \
  "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-packaging \
+"
+
  RDEPENDS_${PN}-ptest += " \
  	${PYTHON_PN}-pytest \
  "
author
#4 lore raw

Re: [oe] [meta-python][PATCH 2/2] python3-pint: add missing python3-packaging dep

Sorry about that, didn't see these two messages until now.

On 7/21/20 9:19 AM, Trevor Gamblin wrote:
On 7/16/20 7:18 PM, Ryan Rowe wrote:

Needs python3-setuptools and python3-packaging in RDEPENDS to import cleanly. I'm going to send a follow-up patch for that shortly:

>>> import pint
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/pint/__init__.py", line 28, in <module>
from .registry import LazyRegistry, UnitRegistry
File "/usr/lib/python3.8/site-packages/pint/registry.py", line 49, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Strange... I tested these two patches as bbappends in our meta layer with no issues. Perhaps that path didn't load the unit registry. Thanks for taking care of this.

    Acked-by: Trevor Gamblin mailto:[email protected]

        ---
         meta-python/recipes-devtools/python/python3-pint_0.14.bb | 4 ++++
         1 file changed, 4 insertions(+)

        diff --git a/meta-python/recipes-devtools/python/python3-pint_0.14.bb b/meta-python/recipes-devtools/python/python3-pint_0.14.bb
        index 8e1630476..ab8b4d74d 100644
        --- a/meta-python/recipes-devtools/python/python3-pint_0.14.bb
        +++ b/meta-python/recipes-devtools/python/python3-pint_0.14.bb
        @@ -21,6 +21,10 @@ SRC_URI += " \
            /run-ptest \
         "

        +RDEPENDS_${PN} += " \
        +    ${PYTHON_PN}-packaging \
        +"
        +
         RDEPENDS_${PN}-ptest += " \
            ${PYTHON_PN}-pytest \
         "
Acked-by on v1 1/2
#5 lore raw
In reply to Ryan Rowe
Quoted 1 line · Ryan Rowe
Quoted 18 lines
---
  meta-python/recipes-devtools/python/python3-packaging_20.4.bb | 2 ++
  1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-packaging_20.4.bb +2 -0
index 0f78fd016..c75707e69 100644
@@ -8,5 +8,7 @@ SRC_URI[sha256sum] = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d55
 
  inherit pypi setuptools3
 
+BBCLASSEXTEND = "native"
+
  DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
  RDEPENDS_${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-pyparsing"