!11 [sync] PR-7: openEuler-22.03-LTS-Next Packages upgrade
From: @openeuler-sync-bot Reviewed-by: @shinwell_hu Signed-off-by: @shinwell_hu
This commit is contained in:
commit
597981c6e2
@ -1,43 +0,0 @@
|
||||
From 46361ca058295e3f08d3c54196d990c497834306 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 03:15:51 -0400
|
||||
Subject: [PATCH] Force using system qhull.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
setupext.py | 17 ++---------------
|
||||
1 file changed, 2 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/setupext.py b/setupext.py
|
||||
index d2ff239ad..30e0c9085 100644
|
||||
--- a/setupext.py
|
||||
+++ b/setupext.py
|
||||
@@ -1318,23 +1318,10 @@ class Qhull(SetupPackage):
|
||||
|
||||
def check(self):
|
||||
self.__class__.found_external = True
|
||||
- try:
|
||||
- return self._check_for_pkg_config(
|
||||
- 'libqhull', 'libqhull/qhull_a.h', min_version='2015.2')
|
||||
- except CheckFailed as e:
|
||||
- self.__class__.found_pkgconfig = False
|
||||
- self.__class__.found_external = False
|
||||
- return str(e) + ' Using local copy.'
|
||||
+ return ' Using system copy.'
|
||||
|
||||
def add_flags(self, ext):
|
||||
- if self.found_external:
|
||||
- pkg_config.setup_extension(ext, 'qhull',
|
||||
- default_libraries=['qhull'])
|
||||
- else:
|
||||
- ext.include_dirs.insert(0, 'extern')
|
||||
- ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))
|
||||
- if sysconfig.get_config_var('LIBM') == '-lm':
|
||||
- ext.libraries.extend('m')
|
||||
+ ext.libraries.append('qhull')
|
||||
|
||||
|
||||
class TTConv(SetupPackage):
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@ -1,116 +0,0 @@
|
||||
From d873c282f4ab93f14c6b4ac6f4210852024dba78 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 2 Mar 2019 18:18:29 -0500
|
||||
Subject: [PATCH] Use packaged jquery and jquery-ui.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
.../backends/web_backend/all_figures.html | 6 +--
|
||||
.../backends/web_backend/single_figure.html | 6 +--
|
||||
setup.py | 49 -------------------
|
||||
3 files changed, 6 insertions(+), 55 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/backends/web_backend/all_figures.html b/lib/matplotlib/backends/web_backend/all_figures.html
|
||||
index 41f48dc6d..69097eb4f 100644
|
||||
--- a/lib/matplotlib/backends/web_backend/all_figures.html
|
||||
+++ b/lib/matplotlib/backends/web_backend/all_figures.html
|
||||
@@ -3,9 +3,9 @@
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
|
||||
- <link rel="stylesheet" href="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.css" >
|
||||
- <script src="{{ prefix }}/_static/jquery-ui-1.12.1/external/jquery/jquery.js"></script>
|
||||
- <script src="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.js"></script>
|
||||
+ <link rel="stylesheet" href="/usr/share/javascript/jquery_ui/jquery-ui.min.css" >
|
||||
+ <script src="/usr/share/javascript/jquery/latest/jquery.min.js"></script>
|
||||
+ <script src="/usr/share/javascript/jquery_ui/jquery-ui.min.js"></script>
|
||||
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
|
||||
<script src="{{ prefix }}/js/mpl.js"></script>
|
||||
|
||||
diff --git a/lib/matplotlib/backends/web_backend/single_figure.html b/lib/matplotlib/backends/web_backend/single_figure.html
|
||||
index 4d5a366fb..c11c86618 100644
|
||||
--- a/lib/matplotlib/backends/web_backend/single_figure.html
|
||||
+++ b/lib/matplotlib/backends/web_backend/single_figure.html
|
||||
@@ -3,9 +3,9 @@
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
|
||||
- <link rel="stylesheet" href="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.css" >
|
||||
- <script src="{{ prefix }}/_static/jquery-ui-1.12.1/external/jquery/jquery.js"></script>
|
||||
- <script src="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.js"></script>
|
||||
+ <link rel="stylesheet" href="/usr/share/javascript/jquery_ui/jquery-ui.min.css" >
|
||||
+ <script src="/usr/share/javascript/jquery/latest/jquery.min.js"></script>
|
||||
+ <script src="/usr/share/javascript/jquery_ui/jquery-ui.min.js"></script>
|
||||
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
|
||||
<script src="{{ prefix }}/js/mpl.js"></script>
|
||||
<script>
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 41037e95d..7a0af717f 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -35,8 +35,6 @@ from zipfile import ZipFile
|
||||
|
||||
from setuptools import setup
|
||||
from setuptools.command.build_ext import build_ext as BuildExtCommand
|
||||
-from setuptools.command.develop import develop as DevelopCommand
|
||||
-from setuptools.command.install_lib import install_lib as InstallLibCommand
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
# The setuptools version of sdist adds a setup.cfg file to the tree.
|
||||
@@ -146,53 +144,6 @@ cmdclass['test'] = NoopTestCommand
|
||||
cmdclass['build_ext'] = BuildExtraLibraries
|
||||
|
||||
|
||||
-def _download_jquery_to(dest):
|
||||
- # Note: When bumping the jquery-ui version, also update the versions in
|
||||
- # single_figure.html and all_figures.html.
|
||||
- url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"
|
||||
- sha = 'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d'
|
||||
- if not os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")):
|
||||
- _makedirs(dest, exist_ok=True)
|
||||
- try:
|
||||
- buff = download_or_cache(url, sha)
|
||||
- except Exception:
|
||||
- raise IOError("Failed to download jquery-ui. Please download " +
|
||||
- "{url} and extract it to {dest}.".format(
|
||||
- url=url, dest=dest))
|
||||
- with ZipFile(buff) as zf:
|
||||
- zf.extractall(dest)
|
||||
-
|
||||
-
|
||||
-# Relying on versioneer's implementation detail.
|
||||
-_orgin_sdist = cmdclass['sdist']
|
||||
-
|
||||
-
|
||||
-class sdist_with_jquery(_orgin_sdist):
|
||||
- def make_release_tree(self, base_dir, files):
|
||||
- _orgin_sdist.make_release_tree(self, base_dir, files)
|
||||
- _download_jquery_to(
|
||||
- os.path.join(base_dir, "lib/matplotlib/backends/web_backend/"))
|
||||
-
|
||||
-
|
||||
-# Affects install and bdist_wheel.
|
||||
-class install_lib_with_jquery(InstallLibCommand):
|
||||
- def run(self):
|
||||
- InstallLibCommand.run(self)
|
||||
- _download_jquery_to(
|
||||
- os.path.join(self.install_dir, "matplotlib/backends/web_backend/"))
|
||||
-
|
||||
-
|
||||
-class develop_with_jquery(DevelopCommand):
|
||||
- def run(self):
|
||||
- DevelopCommand.run(self)
|
||||
- _download_jquery_to("lib/matplotlib/backends/web_backend/")
|
||||
-
|
||||
-
|
||||
-cmdclass['sdist'] = sdist_with_jquery
|
||||
-cmdclass['install_lib'] = install_lib_with_jquery
|
||||
-cmdclass['develop'] = develop_with_jquery
|
||||
-
|
||||
-
|
||||
# One doesn't normally see `if __name__ == '__main__'` blocks in a setup.py,
|
||||
# however, this is needed on Windows to avoid creating infinite subprocesses
|
||||
# when using multiprocessing.
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,97 +1,43 @@
|
||||
From 84ebbed32cf1c0f4d56a6191ce7470fda6ea0543 Mon Sep 17 00:00:00 2001
|
||||
From 60ab4094d885067c50694d2f11cd640dc5c0f0c6 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
||||
Subject: [PATCH 1/3] matplotlibrc path search fix
|
||||
Subject: [PATCH 1/2] matplotlibrc path search fix
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/__init__.py | 8 +++++---
|
||||
lib/matplotlib/tests/test_rcparams.py | 22 ++++++++++++++++------
|
||||
2 files changed, 21 insertions(+), 9 deletions(-)
|
||||
lib/matplotlib/__init__.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||
index c5accc3c3..bc38f316c 100644
|
||||
index 71c68a3d6b..88be8e97b0 100644
|
||||
--- a/lib/matplotlib/__init__.py
|
||||
+++ b/lib/matplotlib/__init__.py
|
||||
@@ -738,9 +738,12 @@ def _get_data_path():
|
||||
@@ -473,7 +473,8 @@ def get_cachedir():
|
||||
@_logged_cached('matplotlib data path: %s')
|
||||
def get_data_path():
|
||||
"""Return the path to Matplotlib data."""
|
||||
- return str(Path(__file__).with_name("mpl-data"))
|
||||
+ return str(Path(__file__).parent.parent.parent.parent.parent /
|
||||
+ 'share/matplotlib/mpl-data')
|
||||
|
||||
_file = _decode_filesystem_path(__file__)
|
||||
path = os.sep.join([os.path.dirname(_file), 'mpl-data'])
|
||||
+ path = '/usr/share/matplotlib/mpl-data'
|
||||
if os.path.isdir(path):
|
||||
return path
|
||||
|
||||
+ raise RuntimeError('Could not find the matplotlib data files')
|
||||
+
|
||||
# setuptools' namespace_packages may highjack this init file
|
||||
# so need to try something known to be in matplotlib, not basemap
|
||||
import matplotlib.afm
|
||||
@@ -821,8 +824,7 @@ def matplotlib_fname():
|
||||
|
||||
- `$HOME/.matplotlib/matplotlibrc` if `$HOME` is defined.
|
||||
|
||||
- - Lastly, it looks in `$MATPLOTLIBDATA/matplotlibrc` for a
|
||||
- system-defined copy.
|
||||
+ - Lastly, it looks in `/etc/matplotlibrc` for a system-defined copy.
|
||||
def matplotlib_fname():
|
||||
@@ -493,6 +494,7 @@ def matplotlib_fname():
|
||||
is not defined)
|
||||
- On other platforms,
|
||||
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
||||
+ - ``/etc/matplotlibrc``
|
||||
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
||||
exist.
|
||||
"""
|
||||
|
||||
def gen_candidates():
|
||||
@@ -835,7 +837,7 @@ def matplotlib_fname():
|
||||
@@ -511,6 +513,7 @@ def matplotlib_fname():
|
||||
yield matplotlibrc
|
||||
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
||||
yield os.path.join(_get_configdir(), 'matplotlibrc')
|
||||
- yield os.path.join(get_data_path(), 'matplotlibrc')
|
||||
yield os.path.join(get_configdir(), 'matplotlibrc')
|
||||
+ yield '/etc/matplotlibrc'
|
||||
yield os.path.join(get_data_path(), 'matplotlibrc')
|
||||
|
||||
for fname in gen_candidates():
|
||||
if os.path.exists(fname):
|
||||
diff --git a/lib/matplotlib/tests/test_rcparams.py b/lib/matplotlib/tests/test_rcparams.py
|
||||
index c0378e1bf..7f14bcc46 100644
|
||||
--- a/lib/matplotlib/tests/test_rcparams.py
|
||||
+++ b/lib/matplotlib/tests/test_rcparams.py
|
||||
@@ -424,14 +424,25 @@ def test_rcparams_reset_after_fail():
|
||||
assert mpl.rcParams['text.usetex'] is False
|
||||
|
||||
|
||||
-def test_if_rctemplate_is_up_to_date():
|
||||
+@pytest.fixture
|
||||
+def mplrc():
|
||||
+ # This is the Fedora-specific location ...
|
||||
+ if 'MATPLOTLIBDATA' in os.environ:
|
||||
+ # ... in buildroot.
|
||||
+ return os.path.join(os.environ['MATPLOTLIBDATA'],
|
||||
+ '../../../../etc/matplotlibrc')
|
||||
+ else:
|
||||
+ # ... on installed systems.
|
||||
+ return '/etc/matplotlibrc'
|
||||
+
|
||||
+
|
||||
+def test_if_rctemplate_is_up_to_date(mplrc):
|
||||
# This tests if the matplotlibrc.template file
|
||||
# contains all valid rcParams.
|
||||
dep1 = mpl._all_deprecated
|
||||
dep2 = mpl._deprecated_set
|
||||
deprecated = list(dep1.union(dep2))
|
||||
- path_to_rc = os.path.join(mpl.get_data_path(), 'matplotlibrc')
|
||||
- with open(path_to_rc, "r") as f:
|
||||
+ with open(mplrc, "r") as f:
|
||||
rclines = f.readlines()
|
||||
missing = {}
|
||||
for k, v in mpl.defaultParams.items():
|
||||
@@ -453,11 +464,10 @@ def test_if_rctemplate_is_up_to_date():
|
||||
.format(missing.items()))
|
||||
|
||||
|
||||
-def test_if_rctemplate_would_be_valid(tmpdir):
|
||||
+def test_if_rctemplate_would_be_valid(tmpdir, mplrc):
|
||||
# This tests if the matplotlibrc.template file would result in a valid
|
||||
# rc file if all lines are uncommented.
|
||||
- path_to_rc = os.path.join(mpl.get_data_path(), 'matplotlibrc')
|
||||
- with open(path_to_rc, "r") as f:
|
||||
+ with open(mplrc, "r") as f:
|
||||
rclines = f.readlines()
|
||||
newlines = []
|
||||
for line in rclines:
|
||||
--
|
||||
2.20.1
|
||||
2.31.1
|
||||
|
||||
|
||||
165
0002-Set-FreeType-version-to-2.10.4-and-update-tolerances.patch
Normal file
165
0002-Set-FreeType-version-to-2.10.4-and-update-tolerances.patch
Normal file
@ -0,0 +1,165 @@
|
||||
From 7ca8afa7fa3e141464c1ef2b2c58b23b586bf310 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 14 Feb 2020 06:05:42 -0500
|
||||
Subject: [PATCH 2/2] Set FreeType version to 2.10.4 and update tolerances.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/__init__.py | 2 +-
|
||||
lib/matplotlib/tests/test_axes.py | 4 ++--
|
||||
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
|
||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
||||
lib/matplotlib/tests/test_polar.py | 2 +-
|
||||
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
||||
setupext.py | 9 ++++++++-
|
||||
7 files changed, 23 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||
index 88be8e97b0..22dc74181e 100644
|
||||
--- a/lib/matplotlib/__init__.py
|
||||
+++ b/lib/matplotlib/__init__.py
|
||||
@@ -1137,7 +1137,7 @@ default_test_modules = [
|
||||
def _init_tests():
|
||||
# The version of FreeType to install locally for running the
|
||||
# tests. This must match the value in `setupext.py`
|
||||
- LOCAL_FREETYPE_VERSION = '2.6.1'
|
||||
+ LOCAL_FREETYPE_VERSION = '2.10.4'
|
||||
|
||||
from matplotlib import ft2font
|
||||
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
||||
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
||||
index 7950e5b830..046dbbe1b8 100644
|
||||
--- a/lib/matplotlib/tests/test_axes.py
|
||||
+++ b/lib/matplotlib/tests/test_axes.py
|
||||
@@ -6500,7 +6500,7 @@ def test_normal_axes():
|
||||
]
|
||||
for nn, b in enumerate(bbaxis):
|
||||
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
||||
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
|
||||
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
|
||||
|
||||
target = [
|
||||
[150.0, 119.999, 930.0, 11.111],
|
||||
@@ -6518,7 +6518,7 @@ def test_normal_axes():
|
||||
|
||||
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
||||
targetbb = mtransforms.Bbox.from_bounds(*target)
|
||||
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
|
||||
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
|
||||
|
||||
# test that get_position roundtrips to get_window_extent
|
||||
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
||||
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
index 117b221cc2..d009912dfa 100644
|
||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
@@ -429,7 +429,7 @@ def test_hidden_axes():
|
||||
extents1 = np.copy(axs[0, 0].get_position().extents)
|
||||
|
||||
np.testing.assert_allclose(
|
||||
- extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-5)
|
||||
+ extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-2)
|
||||
|
||||
|
||||
def test_colorbar_align():
|
||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
||||
index b5fd906d2f..8e3801a231 100644
|
||||
--- a/lib/matplotlib/tests/test_mathtext.py
|
||||
+++ b/lib/matplotlib/tests/test_mathtext.py
|
||||
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
import os
|
||||
+import platform
|
||||
import re
|
||||
|
||||
import numpy as np
|
||||
@@ -189,7 +190,8 @@ def baseline_images(request, fontset, index, text):
|
||||
@pytest.mark.parametrize(
|
||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
||||
@pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
|
||||
-@image_comparison(baseline_images=None)
|
||||
+@image_comparison(baseline_images=None,
|
||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
||||
def test_mathtext_rendering(baseline_images, fontset, index, text):
|
||||
mpl.rcParams['mathtext.fontset'] = fontset
|
||||
fig = plt.figure(figsize=(5.25, 0.75))
|
||||
@@ -213,7 +215,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
|
||||
@pytest.mark.parametrize(
|
||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
||||
@pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
|
||||
-@image_comparison(baseline_images=None, extensions=['png'])
|
||||
+@image_comparison(baseline_images=None, extensions=['png'],
|
||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
||||
def test_mathfont_rendering(baseline_images, fontset, index, text):
|
||||
mpl.rcParams['mathtext.fontset'] = fontset
|
||||
fig = plt.figure(figsize=(5.25, 0.75))
|
||||
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||
index c614eff027..daf4e26fb8 100644
|
||||
--- a/lib/matplotlib/tests/test_polar.py
|
||||
+++ b/lib/matplotlib/tests/test_polar.py
|
||||
@@ -312,7 +312,7 @@ def test_get_tightbbox_polar():
|
||||
fig.canvas.draw()
|
||||
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
||||
assert_allclose(
|
||||
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
|
||||
+ bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1)
|
||||
|
||||
|
||||
@check_figures_equal(extensions=["png"])
|
||||
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
||||
index 23d363b508..e94c863477 100644
|
||||
--- a/lib/matplotlib/tests/test_tightlayout.py
|
||||
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
||||
@@ -172,12 +172,12 @@ def test_outward_ticks():
|
||||
plt.tight_layout()
|
||||
# These values were obtained after visual checking that they correspond
|
||||
# to a tight layouting that did take the ticks into account.
|
||||
- ans = [[[0.091, 0.607], [0.433, 0.933]],
|
||||
- [[0.579, 0.607], [0.922, 0.933]],
|
||||
- [[0.091, 0.140], [0.433, 0.466]],
|
||||
- [[0.579, 0.140], [0.922, 0.466]]]
|
||||
+ ans = [[[0.09, 0.61], [0.43, 0.93]],
|
||||
+ [[0.58, 0.61], [0.92, 0.93]],
|
||||
+ [[0.09, 0.14], [0.43, 0.47]],
|
||||
+ [[0.58, 0.14], [0.92, 0.47]]]
|
||||
for nn, ax in enumerate(fig.axes):
|
||||
- assert_array_equal(np.round(ax.get_position().get_points(), 3),
|
||||
+ assert_array_equal(np.round(ax.get_position().get_points(), 2),
|
||||
ans[nn])
|
||||
|
||||
|
||||
diff --git a/setupext.py b/setupext.py
|
||||
index d8d0b6b393..e44d3b046a 100644
|
||||
--- a/setupext.py
|
||||
+++ b/setupext.py
|
||||
@@ -167,12 +167,18 @@ _freetype_hashes = {
|
||||
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
||||
'2.10.1':
|
||||
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
||||
+ '2.10.2':
|
||||
+ 'e09aa914e4f7a5d723ac381420949c55c0b90b15744adce5d1406046022186ab',
|
||||
+ '2.10.4':
|
||||
+ '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
|
||||
+ '2.11.0':
|
||||
+ 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f',
|
||||
}
|
||||
# This is the version of FreeType to use when building a local
|
||||
# version. It must match the value in
|
||||
# lib/matplotlib.__init__.py and also needs to be changed below in the
|
||||
# embedded windows build script (grep for "REMINDER" in this file)
|
||||
-LOCAL_FREETYPE_VERSION = '2.6.1'
|
||||
+LOCAL_FREETYPE_VERSION = '2.10.4'
|
||||
LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown')
|
||||
|
||||
LOCAL_QHULL_VERSION = '2020.2'
|
||||
@@ -565,6 +571,7 @@ class FreeType(SetupPackage):
|
||||
ext.extra_objects.insert(
|
||||
0, str(src_path / 'objs' / '.libs' / libfreetype))
|
||||
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
|
||||
+ ext.libraries.append('brotlidec')
|
||||
|
||||
def do_custom_build(self, env):
|
||||
# We're using a system freetype
|
||||
--
|
||||
2.31.1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,18 +1,18 @@
|
||||
%global debug_package %{nil}
|
||||
Name: python-matplotlib
|
||||
Version: 2.2.4
|
||||
Release: 4
|
||||
Version: 3.4.3
|
||||
Release: 1
|
||||
Summary: A comprehensive library for creating static, animated, and interactive visualizations
|
||||
License: Python and MIT and OFL-1.1 and BSD-3-Clause
|
||||
License: Python and MIT and OFL-1.1 and Public Domain
|
||||
URL: https://github.com/matplotlib/matplotlib
|
||||
Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz
|
||||
# The config file for python-matplotlib
|
||||
Source1: setup.cfg
|
||||
Source1000: https://github.com/QuLogic/mpl-images/archive/v2.2.3-with-freetype-2.8/matplotlib-2.2.3-with-freetype-2.9.1.tar.gz
|
||||
Patch0001: 0001-Use-packaged-jquery-and-jquery-ui.patch
|
||||
Patch0002: 0001-matplotlibrc-path-search-fix.patch
|
||||
Patch0003: 0001-Force-using-system-qhull.patch
|
||||
Source1000: https://github.com/QuLogic/mpl-images/archive/v3.4.3-with-freetype-2.10.4/matplotlib-3.4.3-with-freetype-2.10.4.tar.gz
|
||||
Patch0001: 0001-matplotlibrc-path-search-fix.patch
|
||||
Patch0002: 0002-Set-FreeType-version-to-2.10.4-and-update-tolerances.patch
|
||||
BuildRequires: freetype-devel libpng-devel qhull-devel texlive-cm xorg-x11-server-Xvfb zlib-devel
|
||||
BuildRequires: python3-certifi
|
||||
|
||||
|
||||
%description
|
||||
@ -99,29 +99,29 @@ Requires: python3-matplotlib = %{version}-%{release}
|
||||
Test data for python3-matplotlib.
|
||||
|
||||
%prep
|
||||
%autosetup -n matplotlib-%{version} -p1 -N
|
||||
%autosetup -n matplotlib-%{version} -N
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-2.2.3-with-freetype-2.9.1/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
||||
rm -r extern/libqhull
|
||||
sed 's/\(backend = \).*/\1TkAgg/' >setup.cfg <%{SOURCE1}
|
||||
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.4.3-with-freetype-2.10.4/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
||||
|
||||
# Copy setup.cfg to the builddir
|
||||
cp -p %{SOURCE1} setup.cfg
|
||||
|
||||
%build
|
||||
export http_proxy=http://127.0.0.1/
|
||||
find examples -name '*.py' -exec chmod a-x '{}' \;
|
||||
MPLCONFIGDIR=$PWD MATPLOTLIBDATA=$PWD/lib/matplotlib/mpl-data xvfb-run %{__python3} setup.py build
|
||||
|
||||
PLCONFIGDIR=$PWD %py3_build
|
||||
|
||||
%install
|
||||
export http_proxy=http://127.0.0.1/
|
||||
|
||||
MPLCONFIGDIR=$PWD %py3_install
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib
|
||||
MPLCONFIGDIR=$PWD MATPLOTLIBDATA=$PWD/lib/matplotlib/mpl-data/ %{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
||||
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data/matplotlibrc %{buildroot}%{_sysconfdir}
|
||||
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data %{buildroot}%{_datadir}/matplotlib
|
||||
chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py
|
||||
|
||||
%files -n python-matplotlib-data
|
||||
%{_sysconfdir}/matplotlibrc
|
||||
%{_datadir}/matplotlib/mpl-data/
|
||||
%exclude %{_datadir}/matplotlib/mpl-data/fonts/
|
||||
|
||||
@ -163,6 +163,9 @@ chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py
|
||||
%{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*}
|
||||
|
||||
%changelog
|
||||
* Fri Jan 28 2022 SimpleUpdate Robot <tc@openeuler.org> - 3.4.3-1
|
||||
- Upgrade to version 3.4.3
|
||||
|
||||
* Wed Mar 10 2021 caodongxia <caodongxia@huawei.com> - 2.2.4-4
|
||||
- Fix the function-import matplotlib and import matplotlib.pyplot
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user