mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-01-12 15:31:45 +00:00
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>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
From b19715aeafcf8440466553d01717924add1eabf4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 9 Apr 2025 23:17:12 -0700
|
||||
Subject: [PATCH] Change types for width/height to match definitions in
|
||||
BufferRegion
|
||||
|
||||
This is found with clang
|
||||
|
||||
Fixes
|
||||
../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]
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/matplotlib/matplotlib/pull/29894]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/_backend_agg.h | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/_backend_agg.h b/src/_backend_agg.h
|
||||
index 0e33d38dfd..dcbd7e1496 100644
|
||||
--- a/src/_backend_agg.h
|
||||
+++ b/src/_backend_agg.h
|
||||
@@ -131,12 +131,12 @@ class RendererAgg
|
||||
|
||||
virtual ~RendererAgg();
|
||||
|
||||
- unsigned int get_width()
|
||||
+ int get_width()
|
||||
{
|
||||
return width;
|
||||
}
|
||||
|
||||
- unsigned int get_height()
|
||||
+ int get_height()
|
||||
{
|
||||
return height;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ class RendererAgg
|
||||
void restore_region(BufferRegion ®);
|
||||
void restore_region(BufferRegion ®ion, int xx1, int yy1, int xx2, int yy2, int x, int y);
|
||||
|
||||
- unsigned int width, height;
|
||||
+ int width, height;
|
||||
double dpi;
|
||||
size_t NUMBYTES; // the number of bytes in buffer
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From a6b0bc129de493f57bf79005c48a8d4ca0df68c2 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 9 Apr 2025 17:34:55 -0700
|
||||
Subject: [PATCH] Do not download external dependency tarballs via meson
|
||||
|
||||
They are fetched by bitbake fetcher already
|
||||
|
||||
Upstream-Status: Inappropriate [ OE-Specific ]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
subprojects/freetype-2.6.1.wrap | 7 +------
|
||||
subprojects/qhull.wrap | 9 ++-------
|
||||
2 files changed, 3 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/subprojects/freetype-2.6.1.wrap b/subprojects/freetype-2.6.1.wrap
|
||||
index 763362b..74ecb13 100644
|
||||
--- a/subprojects/freetype-2.6.1.wrap
|
||||
+++ b/subprojects/freetype-2.6.1.wrap
|
||||
@@ -1,10 +1,5 @@
|
||||
[wrap-file]
|
||||
-source_url = https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
|
||||
-source_fallback_url = https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz
|
||||
-source_filename = freetype-2.6.1.tar.gz
|
||||
-source_hash = 0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
|
||||
-
|
||||
-patch_directory = freetype-2.6.1-meson
|
||||
+directory = freetype-2.6.1
|
||||
|
||||
[provide]
|
||||
freetype-2.6.1 = freetype_dep
|
||||
diff --git a/subprojects/qhull.wrap b/subprojects/qhull.wrap
|
||||
index c52b07d..30b6904 100644
|
||||
--- a/subprojects/qhull.wrap
|
||||
+++ b/subprojects/qhull.wrap
|
||||
@@ -1,9 +1,4 @@
|
||||
[wrap-file]
|
||||
-# Also bump the cache key in `.circleci/config.yml`.
|
||||
-# Also update the docs in `docs/devel/dependencies.rst`.
|
||||
-directory = qhull-8.0.2
|
||||
-source_url = https://github.com/qhull/qhull/archive/v8.0.2/qhull-8.0.2.tar.gz
|
||||
-source_filename = qhull-8.0.2.tgz
|
||||
-source_hash = 8774e9a12c70b0180b95d6b0b563c5aa4bea8d5960c15e18ae3b6d2521d64f8b
|
||||
+directory = qhull-2020.2
|
||||
|
||||
-patch_directory = qhull-8.0.2
|
||||
+patch_directory = qhull-2020.2
|
||||
@@ -1,75 +0,0 @@
|
||||
Disable automatic downloading of components!
|
||||
|
||||
Upstream-Status: Inappropriate [disable feature]
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
|
||||
|
||||
Update patch to fit on 3.7.2.
|
||||
|
||||
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 0bea13fa6f..f39d8fc871 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -327,13 +327,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
|
||||
"pillow>=6.2.0",
|
||||
"pyparsing>=2.3.1,<3.1",
|
||||
"python-dateutil>=2.7",
|
||||
- ] + (
|
||||
- # Installing from a git checkout that is not producing a wheel.
|
||||
- ["setuptools_scm>=7"] if (
|
||||
- Path(__file__).with_name(".git").exists() and
|
||||
- os.environ.get("CIBUILDWHEEL", "0") != "1"
|
||||
- ) else []
|
||||
- ),
|
||||
+ ],
|
||||
extras_require={
|
||||
':python_version<"3.10"': [
|
||||
"importlib-resources>=3.2.0",
|
||||
diff --git a/setupext.py b/setupext.py
|
||||
index a898d642d6..474172ff8f 100644
|
||||
--- a/setupext.py
|
||||
+++ b/setupext.py
|
||||
@@ -66,40 +66,7 @@ def get_from_cache_or_download(url, sha):
|
||||
BytesIO
|
||||
The file loaded into memory.
|
||||
"""
|
||||
- cache_dir = _get_xdg_cache_dir()
|
||||
-
|
||||
- if cache_dir is not None: # Try to read from cache.
|
||||
- try:
|
||||
- data = (cache_dir / sha).read_bytes()
|
||||
- except IOError:
|
||||
- pass
|
||||
- else:
|
||||
- if _get_hash(data) == sha:
|
||||
- return BytesIO(data)
|
||||
-
|
||||
- # jQueryUI's website blocks direct downloads from urllib.request's
|
||||
- # default User-Agent, but not (for example) wget; so I don't feel too
|
||||
- # bad passing in an empty User-Agent.
|
||||
- with urllib.request.urlopen(
|
||||
- urllib.request.Request(url, headers={"User-Agent": ""}),
|
||||
- context=_get_ssl_context()) as req:
|
||||
- data = req.read()
|
||||
-
|
||||
- file_sha = _get_hash(data)
|
||||
- if file_sha != sha:
|
||||
- raise Exception(
|
||||
- f"The downloaded file does not match the expected sha. {url} was "
|
||||
- f"expected to have {sha} but it had {file_sha}")
|
||||
-
|
||||
- if cache_dir is not None: # Try to cache the downloaded file.
|
||||
- try:
|
||||
- cache_dir.mkdir(parents=True, exist_ok=True)
|
||||
- with open(cache_dir / sha, "xb") as fout:
|
||||
- fout.write(data)
|
||||
- except IOError:
|
||||
- pass
|
||||
-
|
||||
- return BytesIO(data)
|
||||
+ raise IOError(f"Automatic downloading is disabled.")
|
||||
|
||||
|
||||
def get_and_extract_tarball(urls, sha, dirname):
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
pytest --automake --pyargs matplotlib
|
||||
Reference in New Issue
Block a user