summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-07-25 15:09:40 -0400
committerKhem Raj <raj.khem@gmail.com>2023-07-25 12:46:19 -0700
commit3a63fbf62a72cbfb407f776f673ca34e43f08b9a (patch)
tree4bff432a5e7042eab1b18fcc5771a4fb02be6de8
parentfe48529f1c763ffaea6835837da41421c9a18ee1 (diff)
downloadmeta-openembedded-3a63fbf62a72cbfb407f776f673ca34e43f08b9a.tar.gz
python3-matplotlib: upgrade 3.6.3 -> 3.7.2
- Adjust target lines in setup.py for LIC_FILES_CHKSUM, since the content of interest has moved (but not changed) - Tweak matplotlib-disable-download.patch to apply on 3.7.2 - Remove backported patch since it's in 3.7.2: [tgamblin@megalith matplotlib]$ git log --oneline --grep="removed RandomNumberGenerator class" 601d92a885 removed RandomNumberGenerator class, included <random>, replaced random_shuffle with shuffle and used mersenne twister engine to generate uniform random bit generator for the shuffle. [tgamblin@megalith matplotlib]$ git tag --contains 601d92a885 v3.7.0 v3.7.0rc1 v3.7.1 v3.7.2 Changelog: https://github.com/matplotlib/matplotlib/releases Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/0001-removed-RandomNumberGenerator-class-included-random-.patch59
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch28
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb (renamed from meta-python/recipes-devtools/python/python3-matplotlib_3.6.3.bb)7
3 files changed, 18 insertions, 76 deletions
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/0001-removed-RandomNumberGenerator-class-included-random-.patch b/meta-python/recipes-devtools/python/python3-matplotlib/0001-removed-RandomNumberGenerator-class-included-random-.patch
deleted file mode 100644
index 1f9b8cdeaf..0000000000
--- a/meta-python/recipes-devtools/python/python3-matplotlib/0001-removed-RandomNumberGenerator-class-included-random-.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 3eb9987b02cc10b93e09219ddc86aa6be5f10177 Mon Sep 17 00:00:00 2001
2From: tybeller <ty.c.beller@gmail.com>
3Date: Fri, 30 Sep 2022 16:13:41 -0400
4Subject: [PATCH] removed RandomNumberGenerator class, included <random>,
5 replaced random_shuffle with shuffle and used mersenne twister engine to
6 generate uniform random bit generator for the shuffle.
7
8Upstream-Status: Backport [https://github.com/matplotlib/matplotlib/commit/601d92a8850]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/tri/_tri.cpp | 20 ++++----------------
12 1 file changed, 4 insertions(+), 16 deletions(-)
13
14diff --git a/src/tri/_tri.cpp b/src/tri/_tri.cpp
15index b7a87783de..6e639eea44 100644
16--- a/src/tri/_tri.cpp
17+++ b/src/tri/_tri.cpp
18@@ -12,6 +12,7 @@
19
20 #include <algorithm>
21 #include <set>
22+#include <random>
23
24
25 TriEdge::TriEdge()
26@@ -1465,8 +1466,8 @@ TrapezoidMapTriFinder::initialize()
27 _tree->assert_valid(false);
28
29 // Randomly shuffle all edges other than first 2.
30- RandomNumberGenerator rng(1234);
31- std::random_shuffle(_edges.begin()+2, _edges.end(), rng);
32+ std::mt19937 rng(1234);
33+ std::shuffle(_edges.begin()+2, _edges.end(), rng);
34
35 // Add edges, one at a time, to tree.
36 size_t nedges = _edges.size();
37@@ -2055,17 +2056,4 @@ TrapezoidMapTriFinder::Trapezoid::set_upper_right(Trapezoid* upper_right_)
38 upper_right = upper_right_;
39 if (upper_right != 0)
40 upper_right->upper_left = this;
41-}
42-
43-
44-
45-RandomNumberGenerator::RandomNumberGenerator(unsigned long seed)
46- : _m(21870), _a(1291), _c(4621), _seed(seed % _m)
47-{}
48-
49-unsigned long
50-RandomNumberGenerator::operator()(unsigned long max_value)
51-{
52- _seed = (_seed*_a + _c) % _m;
53- return (_seed*max_value) / _m;
54-}
55+}
56\ No newline at end of file
57--
582.39.0
59
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
index 899cac624a..aea8f62ea7 100644
--- a/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch
+++ b/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch
@@ -4,19 +4,17 @@ Upstream-Status: Inappropriate [disable feature]
4 4
5Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> 5Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
6 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
7--- a/setup.py 13--- a/setup.py
8+++ b/setup.py 14+++ b/setup.py
9@@ -303,7 +303,6 @@ setup( # Finally, pass this all along t 15@@ -327,13 +327,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
10 setup_requires=[
11 "certifi>=2020.06.20",
12 "numpy>=1.19",
13- "setuptools_scm>=7",
14 ],
15 install_requires=[
16 "contourpy>=1.0.1",
17@@ -315,13 +314,7 @@ setup( # Finally, pass this all along t
18 "pillow>=6.2.0", 16 "pillow>=6.2.0",
19 "pyparsing>=2.2.1", 17 "pyparsing>=2.3.1,<3.1",
20 "python-dateutil>=2.7", 18 "python-dateutil>=2.7",
21- ] + ( 19- ] + (
22- # Installing from a git checkout that is not producing a wheel. 20- # Installing from a git checkout that is not producing a wheel.
@@ -26,12 +24,14 @@ Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
26- ) else [] 24- ) else []
27- ), 25- ),
28+ ], 26+ ],
29 use_scm_version={ 27 extras_require={
30 "version_scheme": "release-branch-semver", 28 ':python_version<"3.10"': [
31 "local_scheme": "node-and-date", 29 "importlib-resources>=3.2.0",
30diff --git a/setupext.py b/setupext.py
31index a898d642d6..474172ff8f 100644
32--- a/setupext.py 32--- a/setupext.py
33+++ b/setupext.py 33+++ b/setupext.py
34@@ -65,40 +65,7 @@ def get_from_cache_or_download(url, sha) 34@@ -66,40 +66,7 @@ def get_from_cache_or_download(url, sha):
35 BytesIO 35 BytesIO
36 The file loaded into memory. 36 The file loaded into memory.
37 """ 37 """
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib_3.6.3.bb b/meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb
index fa0a78d6a9..72c369100a 100644
--- a/meta-python/recipes-devtools/python/python3-matplotlib_3.6.3.bb
+++ b/meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "https://github.com/matplotlib/matplotlib"
7SECTION = "devel/python" 7SECTION = "devel/python"
8LICENSE = "PSF-2.0" 8LICENSE = "PSF-2.0"
9LIC_FILES_CHKSUM = "\ 9LIC_FILES_CHKSUM = "\
10 file://setup.py;beginline=283;endline=283;md5=20e7ab4d2b2b1395a0e4ab800181eb96 \ 10 file://setup.py;beginline=293;endline=293;md5=20e7ab4d2b2b1395a0e4ab800181eb96 \
11 file://LICENSE/LICENSE;md5=afec61498aa5f0c45936687da9a53d74 \ 11 file://LICENSE/LICENSE;md5=afec61498aa5f0c45936687da9a53d74 \
12" 12"
13 13
@@ -20,15 +20,16 @@ DEPENDS = "\
20 python3-pytz-native \ 20 python3-pytz-native \
21 python3-certifi-native \ 21 python3-certifi-native \
22 python3-setuptools-scm-native \ 22 python3-setuptools-scm-native \
23 python3-pybind11-native \
23" 24"
24SRC_URI[sha256sum] = "1f4d69707b1677560cd952544ee4962f68ff07952fb9069ff8c12b56353cb8c9" 25SRC_URI[sha256sum] = "a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b"
25 26
26inherit pypi setuptools3 pkgconfig 27inherit pypi setuptools3 pkgconfig
27 28
28# Stop the component from attempting to download when it detects a missing 29# Stop the component from attempting to download when it detects a missing
29# dependency 30# dependency
30SRC_URI += "file://matplotlib-disable-download.patch \ 31SRC_URI += "file://matplotlib-disable-download.patch \
31 file://0001-removed-RandomNumberGenerator-class-included-random-.patch" 32"
32 33
33# This python module requires a full copy of freetype-2.6.1 34# This python module requires a full copy of freetype-2.6.1
34SRC_URI += "https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz;name=freetype;subdir=matplotlib-${PV}/build" 35SRC_URI += "https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz;name=freetype;subdir=matplotlib-${PV}/build"