summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-matplotlib
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-04-09 18:23:38 -0700
committerKhem Raj <raj.khem@gmail.com>2025-04-10 18:39:31 -0700
commit4042e529b9cfcd5b598e53a1db839e9964caffe2 (patch)
treebc53e1af810540b901fdf584778e477db406cc54 /meta-python/recipes-devtools/python/python3-matplotlib
parent4085ac5975f21874012b38c6952ab75af5deea58 (diff)
downloadmeta-openembedded-4042e529b9cfcd5b598e53a1db839e9964caffe2.tar.gz
python3-matplotlib: Upgrade to 3.10.1
- Adjust for move to meson build system. - Use system freetype and qhull - Add ptest insfrastructure, they do not pass yet - Add a patch to fix build on 32bit machines Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Trevor Gamblin <tgamblin@baylibre.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-matplotlib')
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/0001-Change-types-for-width-height-to-match-definitions-i.patch45
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch47
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch75
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/run-ptest3
4 files changed, 95 insertions, 75 deletions
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/0001-Change-types-for-width-height-to-match-definitions-i.patch b/meta-python/recipes-devtools/python/python3-matplotlib/0001-Change-types-for-width-height-to-match-definitions-i.patch
new file mode 100644
index 0000000000..bf73bf9a22
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-matplotlib/0001-Change-types-for-width-height-to-match-definitions-i.patch
@@ -0,0 +1,45 @@
1From b19715aeafcf8440466553d01717924add1eabf4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Apr 2025 23:17:12 -0700
4Subject: [PATCH] Change types for width/height to match definitions in
5 BufferRegion
6
7This is found with clang
8
9Fixes
10../matplotlib-3.10.1/src/_backend_agg_wrapper.cpp:253:17: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]
11
12Upstream-Status: Submitted [https://github.com/matplotlib/matplotlib/pull/29894]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/_backend_agg.h | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/src/_backend_agg.h b/src/_backend_agg.h
19index 0e33d38dfd..dcbd7e1496 100644
20--- a/src/_backend_agg.h
21+++ b/src/_backend_agg.h
22@@ -131,12 +131,12 @@ class RendererAgg
23
24 virtual ~RendererAgg();
25
26- unsigned int get_width()
27+ int get_width()
28 {
29 return width;
30 }
31
32- unsigned int get_height()
33+ int get_height()
34 {
35 return height;
36 }
37@@ -206,7 +206,7 @@ class RendererAgg
38 void restore_region(BufferRegion &reg);
39 void restore_region(BufferRegion &region, int xx1, int yy1, int xx2, int yy2, int x, int y);
40
41- unsigned int width, height;
42+ int width, height;
43 double dpi;
44 size_t NUMBYTES; // the number of bytes in buffer
45
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch b/meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch
new file mode 100644
index 0000000000..144bfac185
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch
@@ -0,0 +1,47 @@
1From a6b0bc129de493f57bf79005c48a8d4ca0df68c2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Apr 2025 17:34:55 -0700
4Subject: [PATCH] Do not download external dependency tarballs via meson
5
6They are fetched by bitbake fetcher already
7
8Upstream-Status: Inappropriate [ OE-Specific ]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 subprojects/freetype-2.6.1.wrap | 7 +------
13 subprojects/qhull.wrap | 9 ++-------
14 2 files changed, 3 insertions(+), 13 deletions(-)
15
16diff --git a/subprojects/freetype-2.6.1.wrap b/subprojects/freetype-2.6.1.wrap
17index 763362b..74ecb13 100644
18--- a/subprojects/freetype-2.6.1.wrap
19+++ b/subprojects/freetype-2.6.1.wrap
20@@ -1,10 +1,5 @@
21 [wrap-file]
22-source_url = https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
23-source_fallback_url = https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz
24-source_filename = freetype-2.6.1.tar.gz
25-source_hash = 0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
26-
27-patch_directory = freetype-2.6.1-meson
28+directory = freetype-2.6.1
29
30 [provide]
31 freetype-2.6.1 = freetype_dep
32diff --git a/subprojects/qhull.wrap b/subprojects/qhull.wrap
33index c52b07d..30b6904 100644
34--- a/subprojects/qhull.wrap
35+++ b/subprojects/qhull.wrap
36@@ -1,9 +1,4 @@
37 [wrap-file]
38-# Also bump the cache key in `.circleci/config.yml`.
39-# Also update the docs in `docs/devel/dependencies.rst`.
40-directory = qhull-8.0.2
41-source_url = https://github.com/qhull/qhull/archive/v8.0.2/qhull-8.0.2.tar.gz
42-source_filename = qhull-8.0.2.tgz
43-source_hash = 8774e9a12c70b0180b95d6b0b563c5aa4bea8d5960c15e18ae3b6d2521d64f8b
44+directory = qhull-2020.2
45
46-patch_directory = qhull-8.0.2
47+patch_directory = qhull-2020.2
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch b/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch
deleted file mode 100644
index aea8f62ea7..0000000000
--- a/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1Disable automatic downloading of components!
2
3Upstream-Status: Inappropriate [disable feature]
4
5Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
6
7Update patch to fit on 3.7.2.
8
9Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
10
11diff --git a/setup.py b/setup.py
12index 0bea13fa6f..f39d8fc871 100644
13--- a/setup.py
14+++ b/setup.py
15@@ -327,13 +327,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
16 "pillow>=6.2.0",
17 "pyparsing>=2.3.1,<3.1",
18 "python-dateutil>=2.7",
19- ] + (
20- # Installing from a git checkout that is not producing a wheel.
21- ["setuptools_scm>=7"] if (
22- Path(__file__).with_name(".git").exists() and
23- os.environ.get("CIBUILDWHEEL", "0") != "1"
24- ) else []
25- ),
26+ ],
27 extras_require={
28 ':python_version<"3.10"': [
29 "importlib-resources>=3.2.0",
30diff --git a/setupext.py b/setupext.py
31index a898d642d6..474172ff8f 100644
32--- a/setupext.py
33+++ b/setupext.py
34@@ -66,40 +66,7 @@ def get_from_cache_or_download(url, sha):
35 BytesIO
36 The file loaded into memory.
37 """
38- cache_dir = _get_xdg_cache_dir()
39-
40- if cache_dir is not None: # Try to read from cache.
41- try:
42- data = (cache_dir / sha).read_bytes()
43- except IOError:
44- pass
45- else:
46- if _get_hash(data) == sha:
47- return BytesIO(data)
48-
49- # jQueryUI's website blocks direct downloads from urllib.request's
50- # default User-Agent, but not (for example) wget; so I don't feel too
51- # bad passing in an empty User-Agent.
52- with urllib.request.urlopen(
53- urllib.request.Request(url, headers={"User-Agent": ""}),
54- context=_get_ssl_context()) as req:
55- data = req.read()
56-
57- file_sha = _get_hash(data)
58- if file_sha != sha:
59- raise Exception(
60- f"The downloaded file does not match the expected sha. {url} was "
61- f"expected to have {sha} but it had {file_sha}")
62-
63- if cache_dir is not None: # Try to cache the downloaded file.
64- try:
65- cache_dir.mkdir(parents=True, exist_ok=True)
66- with open(cache_dir / sha, "xb") as fout:
67- fout.write(data)
68- except IOError:
69- pass
70-
71- return BytesIO(data)
72+ raise IOError(f"Automatic downloading is disabled.")
73
74
75 def get_and_extract_tarball(urls, sha, dirname):
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/run-ptest b/meta-python/recipes-devtools/python/python3-matplotlib/run-ptest
new file mode 100644
index 0000000000..e99c96b342
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-matplotlib/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3pytest --automake --pyargs matplotlib