Compare commits
10 Commits
46033d17ec
...
e57c373a67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e57c373a67 | ||
|
|
86d4870e05 | ||
|
|
8a794dc6c2 | ||
|
|
1f27236a2d | ||
|
|
53759644c4 | ||
|
|
1dbe5b44ad | ||
|
|
597981c6e2 | ||
|
|
62a2eb0549 | ||
|
|
9781413524 | ||
|
|
f63cd55428 |
@ -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
|
||||
|
||||
43
0001-matplotlibrc-path-search-fix.patch
Normal file
43
0001-matplotlibrc-path-search-fix.patch
Normal file
@ -0,0 +1,43 @@
|
||||
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/2] matplotlibrc path search fix
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
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 71c68a3d6b..88be8e97b0 100644
|
||||
--- a/lib/matplotlib/__init__.py
|
||||
+++ b/lib/matplotlib/__init__.py
|
||||
@@ -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')
|
||||
|
||||
|
||||
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.
|
||||
"""
|
||||
@@ -511,6 +513,7 @@ def matplotlib_fname():
|
||||
yield matplotlibrc
|
||||
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
||||
yield os.path.join(get_configdir(), 'matplotlibrc')
|
||||
+ yield '/etc/matplotlibrc'
|
||||
yield os.path.join(get_data_path(), 'matplotlibrc')
|
||||
|
||||
for fname in gen_candidates():
|
||||
--
|
||||
2.31.1
|
||||
|
||||
152
0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch
Normal file
152
0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch
Normal file
@ -0,0 +1,152 @@
|
||||
diff -Nur a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||
--- a/lib/matplotlib/__init__.py 2023-04-13 09:25:35.984951580 +0800
|
||||
+++ b/lib/matplotlib/__init__.py 2023-04-13 09:28:23.220951580 +0800
|
||||
@@ -1284,7 +1284,7 @@
|
||||
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.12.1'
|
||||
|
||||
from matplotlib import ft2font
|
||||
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
||||
diff -Nur a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
||||
--- a/lib/matplotlib/tests/test_axes.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/lib/matplotlib/tests/test_axes.py 2023-04-13 09:32:11.064951580 +0800
|
||||
@@ -7388,7 +7388,7 @@
|
||||
]
|
||||
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],
|
||||
@@ -7406,7 +7406,7 @@
|
||||
|
||||
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 -Nur a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py 2023-04-13 09:35:13.840951580 +0800
|
||||
@@ -431,7 +431,7 @@
|
||||
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():
|
||||
@@ -637,7 +637,7 @@
|
||||
fig.draw_without_rendering()
|
||||
|
||||
pos = axs[0, 0].get_position()
|
||||
- np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3)
|
||||
+ np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2)
|
||||
pos = axs[0, 1].get_position()
|
||||
np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
|
||||
|
||||
@@ -652,10 +652,10 @@
|
||||
|
||||
pos = axs[0, 0].get_position()
|
||||
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
|
||||
- np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-3)
|
||||
+ np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-2)
|
||||
pos = axs[1, 2].get_position()
|
||||
np.testing.assert_allclose(pos.x1, 0.8618, atol=1e-3)
|
||||
- np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
|
||||
+ np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-2)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('arg, state', [
|
||||
diff -Nur a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
|
||||
--- a/lib/matplotlib/tests/test_legend.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/lib/matplotlib/tests/test_legend.py 2023-04-13 09:37:03.376951580 +0800
|
||||
@@ -522,9 +522,9 @@
|
||||
fig.draw_without_rendering()
|
||||
|
||||
assert_allclose(axs.get_window_extent().extents,
|
||||
- axbb[nn])
|
||||
+ axbb[nn], rtol=1)
|
||||
assert_allclose(leg.get_window_extent().extents,
|
||||
- legbb[nn])
|
||||
+ legbb[nn], rtol=1)
|
||||
|
||||
|
||||
@image_comparison(['legend_stackplot.png'])
|
||||
diff -Nur a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||
--- a/lib/matplotlib/tests/test_polar.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/lib/matplotlib/tests/test_polar.py 2023-04-13 09:38:17.120951580 +0800
|
||||
@@ -321,7 +321,7 @@
|
||||
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 -Nur a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
||||
--- a/lib/matplotlib/tests/test_tightlayout.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/lib/matplotlib/tests/test_tightlayout.py 2023-04-13 09:41:04.536951580 +0800
|
||||
@@ -173,12 +173,12 @@
|
||||
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 -Nur a/setupext.py b/setupext.py
|
||||
--- a/setupext.py 2023-03-04 12:50:36.000000000 +0800
|
||||
+++ b/setupext.py 2023-04-13 09:50:01.120951580 +0800
|
||||
@@ -176,13 +176,23 @@
|
||||
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
||||
'2.10.1':
|
||||
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
||||
+ '2.10.2':
|
||||
+ 'e09aa914e4f7a5d723ac381420949c55c0b90b15744adce5d1406046022186ab',
|
||||
+ '2.10.4':
|
||||
+ '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
|
||||
+ '2.11.0':
|
||||
+ 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f',
|
||||
'2.11.1':
|
||||
- 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b'
|
||||
+ 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b',
|
||||
+ '2.12.0':
|
||||
+ '7940a46eeb0255baaa87c553d72778c4f8daa2b8888c8e2a05766a2a8686740c',
|
||||
+ '2.12.1':
|
||||
+ 'efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938',
|
||||
}
|
||||
# This is the version of FreeType to use when building a local version. It
|
||||
# must match the value in lib/matplotlib.__init__.py, and the cache path in
|
||||
# `.circleci/config.yml`.
|
||||
-TESTING_VERSION_OF_FREETYPE = '2.6.1'
|
||||
+TESTING_VERSION_OF_FREETYPE = '2.12.1'
|
||||
if sys.platform.startswith('win') and platform.machine() == 'ARM64':
|
||||
# older versions of freetype are not supported for win/arm64
|
||||
# Matplotlib tests will not pass
|
||||
@@ -597,6 +607,7 @@
|
||||
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
|
||||
Binary file not shown.
Binary file not shown.
@ -1,7 +1,8 @@
|
||||
[libs]
|
||||
system_freetype = True
|
||||
system_qhull = True
|
||||
|
||||
[packages]
|
||||
tests = True
|
||||
toolkits = True
|
||||
toolkits_tests = True
|
||||
|
||||
[rc_options]
|
||||
backend = GTKAgg
|
||||
@ -1,16 +1,17 @@
|
||||
%global debug_package %{nil}
|
||||
Name: python-matplotlib
|
||||
Version: 2.2.4
|
||||
Release: 3
|
||||
Version: 3.7.1
|
||||
Release: 2
|
||||
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
|
||||
Source1: mplsetup.cfg
|
||||
Source1000: https://github.com/QuLogic/mpl-images/archive/v3.7.1-with-freetype-2.12.1/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz
|
||||
Patch0001: 0001-matplotlibrc-path-search-fix.patch
|
||||
Patch0002: 0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch
|
||||
BuildRequires: freetype-devel libpng-devel qhull-devel texlive-cm xorg-x11-server-Xvfb zlib-devel
|
||||
BuildRequires: python3-certifi python3-pybind11 gcc-c++ python3-setuptools_scm
|
||||
|
||||
|
||||
%description
|
||||
@ -52,15 +53,6 @@ Recommends: python3-pillow
|
||||
The package produces publication-quality figures in a variety of hardcopy formats and interactive environments
|
||||
across platforms.
|
||||
|
||||
%package -n python3-matplotlib-qt4
|
||||
Summary: Qt4 backend for python3-matplotlib
|
||||
BuildRequires: python3-PyQt4-devel
|
||||
Requires: python3-matplotlib = %{version}-%{release} python3-matplotlib-qt5 python3-PyQt4
|
||||
%python_provide python3-matplotlib-qt4
|
||||
|
||||
%description -n python3-matplotlib-qt4
|
||||
The qt4 backend for python3-matplotlib.
|
||||
|
||||
%package -n python3-matplotlib-qt5
|
||||
Summary: Qt5 backend for python3-matplotlib
|
||||
BuildRequires: python3-qt5
|
||||
@ -97,27 +89,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
|
||||
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}
|
||||
%patch0002 -p1
|
||||
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.7.1-with-freetype-2.12.1/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
||||
|
||||
# Copy setup.cfg to the builddir
|
||||
cp -p %{SOURCE1} mplsetup.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/
|
||||
|
||||
@ -126,26 +120,20 @@ chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py
|
||||
|
||||
|
||||
%files -n python3-matplotlib
|
||||
%doc README.rst LICENSE/
|
||||
%doc README.md LICENSE/
|
||||
%{python3_sitearch}/{*egg-info,matplotlib-*-nspkg.pth,matplotlib/}
|
||||
%{python3_sitearch}/mpl_toolkits/
|
||||
%{python3_sitearch}/{pylab.py*,__pycache__/*}
|
||||
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
||||
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_qt4*,__pycache__/backend_qt4*}
|
||||
%exclude %{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/*
|
||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_qt5*,__pycache__/backend_qt5*}
|
||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_gtk*,__pycache__/backend_gtk*}
|
||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_tkagg.*,__pycache__/backend_tkagg.*}
|
||||
%exclude %{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*}
|
||||
%exclude %{_pkgdocdir}/*/
|
||||
|
||||
%files -n python3-matplotlib-test-data
|
||||
%{python3_sitearch}/matplotlib/tests/baseline_images/
|
||||
%{python3_sitearch}/mpl_toolkits/tests/baseline_images/
|
||||
|
||||
%files -n python3-matplotlib-qt4
|
||||
%{python3_sitearch}/matplotlib/backends/{backend_qt4.*,__pycache__/backend_qt4.*}
|
||||
%{python3_sitearch}/matplotlib/backends/{backend_qt4agg.*,__pycache__/backend_qt4agg.*}
|
||||
%{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/
|
||||
|
||||
%files -n python3-matplotlib-qt5
|
||||
%{python3_sitearch}/matplotlib/backends/{backend_qt5.*,__pycache__/backend_qt5.*}
|
||||
@ -159,6 +147,21 @@ chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py
|
||||
%{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*}
|
||||
|
||||
%changelog
|
||||
* Wed May 10 2023 wulei <wu_lei@hoperun.com> - 3.7.1-2
|
||||
- Fix the version cannot be detected
|
||||
|
||||
* Fri Apr 14 2023 wulei <wu_lei@hoperun.com> - 3.7.1-1
|
||||
- Upgrade package to version 3.7.1
|
||||
|
||||
* Sat Mar 05 2022 chenchen <chen_aka_jan@163.com> - 3.4.3-2
|
||||
- enable debuginfo
|
||||
|
||||
* 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
|
||||
|
||||
* Fri Feb 19 2021 liyanan <liyanan32@huawei.com> - 2.2.4-3
|
||||
- remove python2 dependency
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user