Skip to contentSkip to conversation

python3-matplotlib: don't use PYTHON_PN

PATCH New Bartosz Golaszewski 1 participant 3 messages Aug 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 python3-matplotlib: don't use PYTHON_PN

We only support python3 so using PYTHON_PN is redundant.

---
 .../python/python3-matplotlib_3.5.1.bb        | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb +12 -12
index cd05b455d..7dfe46f3c 100644
@@ -14,11 +14,11 @@ LIC_FILES_CHKSUM = "\
 DEPENDS = "\
     freetype \
     libpng \
-    ${PYTHON_PN}-numpy-native \
-    ${PYTHON_PN}-pip-native \
-    ${PYTHON_PN}-dateutil-native \
-    ${PYTHON_PN}-pytz-native \
-    ${PYTHON_PN}-certifi-native \
+    python3-numpy-native \
+    python3-pip-native \
+    python3-dateutil-native \
+    python3-pytz-native \
+    python3-certifi-native \
 "
 
 SRC_URI[sha256sum] = "b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c"
@@ -44,13 +44,13 @@ LDFLAGS:remove:toolchain-clang:mips = "-fuse-ld=lld"
 RDEPENDS:${PN} = "\
     freetype \
     libpng \
-    ${PYTHON_PN}-numpy \
-    ${PYTHON_PN}-pyparsing \
-    ${PYTHON_PN}-cycler \
-    ${PYTHON_PN}-dateutil \
-    ${PYTHON_PN}-kiwisolver \
-    ${PYTHON_PN}-pytz \
-    ${PYTHON_PN}-pillow \
+    python3-numpy \
+    python3-pyparsing \
+    python3-cycler \
+    python3-dateutil \
+    python3-kiwisolver \
+    python3-pytz \
+    python3-pillow \
 "
 
 ENABLELTO:toolchain-clang:riscv64 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 python3-matplotlib: add packaging to RDEPENDS

matplotlib needs python3-packaging at runtime. Add it to the package's RDEPENDS.

---
 meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb +1 -0
index 7dfe46f3c..e3e5d85eb 100644
@@ -51,6 +51,7 @@ RDEPENDS:${PN} = "\
     python3-kiwisolver \
     python3-pytz \
     python3-pillow \
+    python3-packaging \
 "
 
 ENABLELTO:toolchain-clang:riscv64 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 python3-matplotlib: bump to 3.5.2

In reply to Bartosz Golaszewski

There's a bug in 3.5.1 that makes importing matplotlib impossible in some environments:

Quoted 1 line
Quoted 1 line
Quoted 1 line

import matplotlib

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/matplotlib/__init__.py", line 895, in <module>

    defaultParams = rcsetup.defaultParams = {

File "/usr/lib/python3.10/site-packages/matplotlib/__init__.py", line 898, in <dictcomp>
rcParamsDefault[key]),
File "/usr/lib/python3.10/site-packages/matplotlib/__init__.py", line 674, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'webagg.port'

This is fixed in 3.5.2.

---
 ...{python3-matplotlib_3.5.1.bb => python3-matplotlib_3.5.2.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-matplotlib_3.5.1.bb => python3-matplotlib_3.5.2.bb} (96%)
meta-python/recipes-devtools/python/python3-matplotlib_3.5.2.bb renamed from meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb +1 -1
similarity index 96%
rename from meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb
rename to meta-python/recipes-devtools/python/python3-matplotlib_3.5.2.bb
index e3e5d85eb..eaa144719 100644
@@ -21,7 +21,7 @@ DEPENDS = "\
     python3-certifi-native \
 "
 
-SRC_URI[sha256sum] = "b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c"
+SRC_URI[sha256sum] = "48cf850ce14fa18067f2d9e0d646763681948487a8080ec0af2686468b4607a2"
 
 inherit pypi setuptools3 pkgconfig
 
Signature · 1 line
2.34.1