Blame 0001-Use-packaged-jquery-and-jquery-ui.patch

95c2d30
diff -ur matplotlib-2.2.5.orig/lib/matplotlib/backends/web_backend/all_figures.html matplotlib-2.2.5/lib/matplotlib/backends/web_backend/all_figures.html
95c2d30
--- matplotlib-2.2.5.orig/lib/matplotlib/backends/web_backend/all_figures.html	2020-02-02 00:15:39.000000000 +0100
95c2d30
+++ matplotlib-2.2.5/lib/matplotlib/backends/web_backend/all_figures.html	2020-02-27 09:31:11.103231677 +0100
853edaf
@@ -3,9 +3,9 @@
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
853edaf
-    <link rel="stylesheet" href="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.css" >
853edaf
-    <script src="{{ prefix }}/_static/jquery-ui-1.12.1/external/jquery/jquery.js"></script>
853edaf
-    <script src="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.js"></script>
853edaf
+    <link rel="stylesheet" href="/usr/share/javascript/jquery_ui/jquery-ui.min.css" >
853edaf
+    <script src="/usr/share/javascript/jquery/latest/jquery.min.js"></script>
853edaf
+    <script src="/usr/share/javascript/jquery_ui/jquery-ui.min.js"></script>
853edaf
     <script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
853edaf
     <script src="{{ prefix }}/js/mpl.js"></script>
853edaf
 
95c2d30
diff -ur matplotlib-2.2.5.orig/lib/matplotlib/backends/web_backend/single_figure.html matplotlib-2.2.5/lib/matplotlib/backends/web_backend/single_figure.html
95c2d30
--- matplotlib-2.2.5.orig/lib/matplotlib/backends/web_backend/single_figure.html	2020-02-02 00:15:39.000000000 +0100
95c2d30
+++ matplotlib-2.2.5/lib/matplotlib/backends/web_backend/single_figure.html	2020-02-27 09:31:11.121231485 +0100
853edaf
@@ -3,9 +3,9 @@
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/page.css" type="text/css">
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/boilerplate.css" type="text/css" />
853edaf
     <link rel="stylesheet" href="{{ prefix }}/_static/css/fbm.css" type="text/css" />
853edaf
-    <link rel="stylesheet" href="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.css" >
853edaf
-    <script src="{{ prefix }}/_static/jquery-ui-1.12.1/external/jquery/jquery.js"></script>
853edaf
-    <script src="{{ prefix }}/_static/jquery-ui-1.12.1/jquery-ui.min.js"></script>
853edaf
+    <link rel="stylesheet" href="/usr/share/javascript/jquery_ui/jquery-ui.min.css" >
853edaf
+    <script src="/usr/share/javascript/jquery/latest/jquery.min.js"></script>
853edaf
+    <script src="/usr/share/javascript/jquery_ui/jquery-ui.min.js"></script>
853edaf
     <script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
853edaf
     <script src="{{ prefix }}/js/mpl.js"></script>
853edaf
     <script>
95c2d30
diff -ur matplotlib-2.2.5.orig/setup.py matplotlib-2.2.5/setup.py
95c2d30
--- matplotlib-2.2.5.orig/setup.py	2020-02-02 00:15:39.000000000 +0100
95c2d30
+++ matplotlib-2.2.5/setup.py	2020-02-27 09:32:11.900580965 +0100
95c2d30
@@ -19,8 +19,6 @@
853edaf
 
853edaf
 from setuptools import setup
853edaf
 from setuptools.command.build_ext import build_ext as BuildExtCommand
853edaf
-from setuptools.command.develop import develop as DevelopCommand
853edaf
-from setuptools.command.install_lib import install_lib as InstallLibCommand
853edaf
 from setuptools.command.test import test as TestCommand
853edaf
 
853edaf
 # The setuptools version of sdist adds a setup.cfg file to the tree.
95c2d30
@@ -130,63 +128,6 @@
853edaf
 cmdclass['build_ext'] = BuildExtraLibraries
853edaf
 
853edaf
 
853edaf
-def _download_jquery_to(dest):
95c2d30
-    if os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")):
95c2d30
-        return
95c2d30
-
95c2d30
-    # If we are installing from an sdist, use the already downloaded jquery-ui
95c2d30
-    sdist_src = os.path.join(
95c2d30
-        "lib/matplotlib/backends/web_backend", "jquery-ui-1.12.1")
95c2d30
-    if os.path.exists(sdist_src):
95c2d30
-        shutil.copytree(sdist_src, os.path.join(dest, "jquery-ui-1.12.1"))
95c2d30
-        return
95c2d30
-
853edaf
-    # Note: When bumping the jquery-ui version, also update the versions in
853edaf
-    # single_figure.html and all_figures.html.
853edaf
-    url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"
853edaf
-    sha = 'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d'
853edaf
-    if not os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")):
853edaf
-        _makedirs(dest, exist_ok=True)
853edaf
-        try:
853edaf
-            buff = download_or_cache(url, sha)
853edaf
-        except Exception:
853edaf
-            raise IOError("Failed to download jquery-ui.  Please download " +
853edaf
-                          "{url} and extract it to {dest}.".format(
853edaf
-                              url=url, dest=dest))
853edaf
-        with ZipFile(buff) as zf:
853edaf
-            zf.extractall(dest)
853edaf
-
853edaf
-
853edaf
-# Relying on versioneer's implementation detail.
853edaf
-_orgin_sdist = cmdclass['sdist']
853edaf
-
853edaf
-
853edaf
-class sdist_with_jquery(_orgin_sdist):
853edaf
-    def make_release_tree(self, base_dir, files):
853edaf
-        _orgin_sdist.make_release_tree(self, base_dir, files)
853edaf
-        _download_jquery_to(
853edaf
-            os.path.join(base_dir, "lib/matplotlib/backends/web_backend/"))
853edaf
-
853edaf
-
853edaf
-# Affects install and bdist_wheel.
853edaf
-class install_lib_with_jquery(InstallLibCommand):
853edaf
-    def run(self):
853edaf
-        InstallLibCommand.run(self)
853edaf
-        _download_jquery_to(
853edaf
-            os.path.join(self.install_dir, "matplotlib/backends/web_backend/"))
853edaf
-
853edaf
-
853edaf
-class develop_with_jquery(DevelopCommand):
853edaf
-    def run(self):
853edaf
-        DevelopCommand.run(self)
853edaf
-        _download_jquery_to("lib/matplotlib/backends/web_backend/")
853edaf
-
853edaf
-
853edaf
-cmdclass['sdist'] = sdist_with_jquery
853edaf
-cmdclass['install_lib'] = install_lib_with_jquery
853edaf
-cmdclass['develop'] = develop_with_jquery
853edaf
-
853edaf
-
853edaf
 # One doesn't normally see `if __name__ == '__main__'` blocks in a setup.py,
853edaf
 # however, this is needed on Windows to avoid creating infinite subprocesses
853edaf
 # when using multiprocessing.