Compare commits

...

2 Commits
master ... f29

Author SHA1 Message Date
Elliott Sales de Andrade 82aa7ee91e Restore missing sources. 2019-03-17 22:58:10 -04:00
Elliott Sales de Andrade 2c8079f719 Update to 2.2.4. 2019-03-09 23:59:00 -05:00
8 changed files with 156 additions and 31 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-2.2.3.tar.gz
/matplotlib-2.2.3-with-freetype-2.8.tar.gz
/matplotlib-2.2.3-with-freetype-2.9.1.tar.gz
/matplotlib-2.2.4.tar.gz

View File

@ -0,0 +1,116 @@
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

View File

@ -1,4 +1,4 @@
From e318adb6b70cdb27eb8cd5235909b8e8430080d7 Mon Sep 17 00:00:00 2001
From 84ebbed32cf1c0f4d56a6191ce7470fda6ea0543 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
@ -93,5 +93,5 @@ index c0378e1bf..7f14bcc46 100644
newlines = []
for line in rclines:
--
2.17.1
2.20.1

View File

@ -1,4 +1,4 @@
From ece1f936ba4c130cf82d3954a5e677d96ca3a854 Mon Sep 17 00:00:00 2001
From 95035beb712088f9b66aae9cc810a1a94685d0da Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 23 Jan 2018 20:27:17 -0500
Subject: [PATCH 2/3] Increase tolerances for non-x86_64 arches.
@ -23,5 +23,5 @@ index 81a51e711..4f70ce861 100644
X, Y, U, V = velocity_field()
mask = np.zeros(U.shape, dtype=bool)
--
2.17.1
2.20.1

View File

@ -1,4 +1,4 @@
From b8a97810843ff739cb98cb5159843f2836dbd8b3 Mon Sep 17 00:00:00 2001
From bcb05f18d78d2a467ddc9cdb0e6bcebd41116ee5 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 31 Mar 2018 00:15:14 -0400
Subject: [PATCH 3/3] Increase some tolerances for 32-bit systems.
@ -26,10 +26,10 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
18 files changed, 53 insertions(+), 54 deletions(-)
diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py
index 0ce6e6252..9a80eec1a 100644
index d008446dc..2d930cacc 100644
--- a/lib/matplotlib/testing/decorators.py
+++ b/lib/matplotlib/testing/decorators.py
@@ -408,7 +408,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,
@@ -418,7 +418,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,
return decorator
@ -53,7 +53,7 @@ index e6aff72bf..b60305bcf 100644
exterior = mpath.Path.unit_rectangle().deepcopy()
exterior.vertices *= 4
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 2fa6c2c94..8c589f514 100644
index dde856669..5cfd4151a 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -555,7 +555,7 @@ def test_single_point():
@ -237,7 +237,7 @@ index 2fa6c2c94..8c589f514 100644
def test_horiz_violinplot_custompoints_200():
ax = plt.axes()
# First 9 digits of frac(sqrt(43))
@@ -3947,7 +3946,7 @@ def test_psd_noise():
@@ -3944,7 +3943,7 @@ def test_psd_noise():
@image_comparison(baseline_images=['csd_freqs'], remove_text=True,
@ -246,7 +246,7 @@ index 2fa6c2c94..8c589f514 100644
def test_csd_freqs():
'''test axes.csd with sinusoidal stimuli'''
n = 10000
@@ -4806,7 +4805,7 @@ def test_rc_spines():
@@ -4803,7 +4802,7 @@ def test_rc_spines():
@image_comparison(baseline_images=['rc_grid'], extensions=['png'],
@ -255,7 +255,7 @@ index 2fa6c2c94..8c589f514 100644
def test_rc_grid():
fig = plt.figure()
rc_dict0 = {
@@ -5301,7 +5300,7 @@ def test_date_timezone_y():
@@ -5298,7 +5297,7 @@ def test_date_timezone_y():
@image_comparison(baseline_images=['date_timezone_x_and_y'],
@ -372,10 +372,10 @@ index 42903ac68..f03a5d0af 100644
n = 60
mask_level = 0.95
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index e6da25789..ed3ab63c9 100644
index c8a23347f..5a23ded19 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -768,7 +768,7 @@ def test_imshow_endianess():
@@ -761,7 +761,7 @@ def test_imshow_endianess():
@image_comparison(baseline_images=['imshow_masked_interpolation'],
@ -385,7 +385,7 @@ index e6da25789..ed3ab63c9 100644
cm = copy(plt.get_cmap('viridis'))
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
index cdc1093e1..ac0d8bf05 100644
index af6701a0f..151b061a5 100644
--- a/lib/matplotlib/tests/test_mathtext.py
+++ b/lib/matplotlib/tests/test_mathtext.py
@@ -173,7 +173,7 @@ def baseline_images(request, fontset, index):
@ -541,10 +541,10 @@ index a7c637428..e22f4ac3e 100644
fig = plt.figure(figsize=(5, 5))
diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py
index 0a506db92..44e1681fc 100644
index d6e57b9b4..c3ac37a7f 100644
--- a/lib/mpl_toolkits/tests/test_mplot3d.py
+++ b/lib/mpl_toolkits/tests/test_mplot3d.py
@@ -225,7 +225,7 @@ def test_text3d():
@@ -226,7 +226,7 @@ def test_text3d():
ax.set_zlabel('Z axis')
@ -553,7 +553,7 @@ index 0a506db92..44e1681fc 100644
def test_trisurf3d():
n_angles = 36
n_radii = 8
@@ -704,7 +704,7 @@ class TestVoxels(object):
@@ -705,7 +705,7 @@ class TestVoxels(object):
@image_comparison(
baseline_images=['voxels-xyz'],
extensions=['png'],
@ -563,5 +563,5 @@ index 0a506db92..44e1681fc 100644
def test_xyz(self):
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
--
2.17.1
2.20.1

View File

@ -1,4 +1,4 @@
From 3e2bfee4e8ce28fffa7e9cd0a054429af2e2ebe3 Mon Sep 17 00:00:00 2001
From 8f2ae0000d8f593fc82243b056ecf57c81059a42 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 31 Mar 2018 00:33:37 -0400
Subject: [PATCH 3/3] Increase some tolerances for non-x86 arches.
@ -44,7 +44,7 @@ index 44f87c5fe..fb50ae710 100644
def test_fancyarrow_dpi_cor_200dpi():
"""
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 2fa6c2c94..f785e3e89 100644
index dde856669..de1632fc4 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -389,7 +389,7 @@ def test_annotate_default_arrow():
@ -56,7 +56,7 @@ index 2fa6c2c94..f785e3e89 100644
def test_polar_annotations():
# you can specify the xypoint and the xytext in different
# positions and coordinate systems, and optionally turn on a
@@ -3267,7 +3267,8 @@ def test_vertex_markers():
@@ -3264,7 +3264,8 @@ def test_vertex_markers():
@image_comparison(baseline_images=['vline_hline_zorder',
@ -66,7 +66,7 @@ index 2fa6c2c94..f785e3e89 100644
def test_eb_line_zorder():
x = list(xrange(10))
@@ -5000,7 +5001,7 @@ def test_title_location_roundtrip():
@@ -4997,7 +4998,7 @@ def test_title_location_roundtrip():
@image_comparison(baseline_images=["loglog"], remove_text=True,
@ -76,10 +76,10 @@ index 2fa6c2c94..f785e3e89 100644
fig, ax = plt.subplots()
x = np.arange(1, 11)
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
index df7a5d08a..3567d7f3d 100644
index 8cd4585bf..29b2c4b46 100644
--- a/lib/matplotlib/tests/test_backends_interactive.py
+++ b/lib/matplotlib/tests/test_backends_interactive.py
@@ -55,4 +55,4 @@ def test_backend(backend):
@@ -57,4 +57,4 @@ def test_backend(backend):
environ["MPLBACKEND"] = backend
proc = Popen([sys.executable, "-c", _test_script], env=environ)
# Empirically, 1s is not enough on Travis.
@ -156,10 +156,10 @@ index 69752e17d..e7c57d470 100644
# Check the figure.align_labels() command
fig = plt.figure(tight_layout=True)
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index e6da25789..626e9eb94 100644
index c8a23347f..afb36587c 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -768,7 +768,7 @@ def test_imshow_endianess():
@@ -761,7 +761,7 @@ def test_imshow_endianess():
@image_comparison(baseline_images=['imshow_masked_interpolation'],
@ -274,5 +274,5 @@ index a7c637428..8fc5b25b1 100644
fig = plt.figure(figsize=(5, 5))
--
2.17.1
2.20.1

View File

@ -32,6 +32,9 @@
#global rctag rc1
# Updated test images for new FreeType.
%global mpl_images_version 2.2.3
# The version of FreeType in this Fedora branch.
%if %{fedora} >= 29
%global ftver 2.9.1
@ -40,7 +43,7 @@
%endif
Name: python-matplotlib
Version: 2.2.3
Version: 2.2.4
Release: 1%{?rctag:.%{rctag}}%{?dist}
Summary: Python 2D plotting library
# qt4_editor backend is MIT
@ -53,11 +56,14 @@ Source1: setup.cfg
# https://src.fedoraproject.org/rpms/qhull/pull-request/1
Patch0001: 0001-Force-using-system-qhull.patch
# Don't attempt to download jQuery and jQuery UI
Patch0002: 0001-Use-packaged-jquery-and-jquery-ui.patch
# Fedora-specific patches; see:
# https://github.com/QuLogic/matplotlib/tree/fedora-patches
# https://github.com/QuLogic/matplotlib/tree/fedora-patches-non-x86
# Updated test images for new FreeType.
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{version}-with-freetype-%{ftver}/matplotlib-%{version}-with-freetype-%{ftver}.tar.gz
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz
# Search in /etc/matplotlibrc:
Patch1001: 0001-matplotlibrc-path-search-fix.patch
# Image tolerances for anything but x86_64:
@ -375,10 +381,12 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
%autosetup -n matplotlib-%{version}%{?rctag} -N
%patch0001 -p1
%patch0002 -p1
# Fedora-specific patches follow:
%patch1001 -p1
# Updated test images for new FreeType.
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
%ifnarch x86_64
%patch1002 -p1
%endif

View File

@ -1,3 +1,3 @@
SHA512 (matplotlib-2.2.3.tar.gz) = d118f5d56e2f578031aba22933c0b3a4423a31a04f50f08cc1aa660186546d09692a9cf401bb5f24cb296f94fbfd8707460728d501ac2bd4a624dfa89e92949b
SHA512 (matplotlib-2.2.4.tar.gz) = c4ceb75314c303d310410683180dbe950223c7f054fc19739c49eaede46f183075ea402e7305843552fae75af3c55560f9e5c5549994cf5fce34f07ad6f3c720
SHA512 (matplotlib-2.2.3-with-freetype-2.9.1.tar.gz) = 00f6d4eeab6d73108129a5ccbaccda37c2e8cc684efeeb03c492a96a2071357a32a624ebfef2770c8c205a3741ef8d947f117351d90d25c4c7b4b8b6b84db556
SHA512 (matplotlib-2.2.3-with-freetype-2.8.tar.gz) = 7f11a0589f2ab5fcbdee0da0d4fa003c62b9e882fbae22a6bc725f791f3ea058b33321a70a5cf1858f494aa1ebb8b3e686c56ff73e6174fb980e159331bd0a0d