Skip to contentSkip to conversation

python3-pint: add setuptools and packaging to RDEPENDS

PATCH Trevor Gamblin 2 participants 2 messages Jul 21, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Trevor Gamblin

pint needs setuptools and packaging to be imported correctly:

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

Add them to RDEPENDS to fix this.

This is a mistake - already acked Ryan's patch to add python3-packaging. Will resend.

Quoted 24 lines
---
  meta-python/recipes-devtools/python/python3-pint_0.14.bb | 5 +++++
  1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-pint_0.14.bb +5 -0
index 8e1630476..333b015a9 100644
@@ -21,6 +21,11 @@ SRC_URI += " \
  	file://run-ptest \
  "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-setuptools \
+    ${PYTHON_PN}-packaging \
+"
+
  RDEPENDS_${PN}-ptest += " \
  	${PYTHON_PN}-pytest \
  "
#2 lore raw
Quoted 13 lines · Trevor Gamblin
Quoted 11 lines · Trevor Gamblin

pint needs setuptools and packaging to be imported correctly:

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 2 lines
Quoted 1 line

Add them to RDEPENDS to fix this.

This is a mistake - already acked Ryan's patch to add python3-packaging. Will resend.

I have squashed changed from this into original and staged it on master-next

Quoted 25 lines
Quoted 22 lines
---
  meta-python/recipes-devtools/python/python3-pint_0.14.bb | 5 +++++
  1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-pint_0.14.bb +5 -0
index 8e1630476..333b015a9 100644
@@ -21,6 +21,11 @@ SRC_URI += " \
  	file://run-ptest  \
  "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-setuptools \
+    ${PYTHON_PN}-packaging \
+"
+
  RDEPENDS_${PN}-ptest += " \
  	${PYTHON_PN}-pytest \
  "