File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131from io import BytesIO
3232import os
3333from string import Template
34+ import shutil
3435from zipfile import ZipFile
3536
3637from setuptools import setup
@@ -147,6 +148,16 @@ def run(self):
147148
148149
149150def _download_jquery_to (dest ):
151+ if os .path .exists (os .path .join (dest , "jquery-ui-1.12.1" )):
152+ return
153+
154+ # If we are installing from an sdist, use the already downloaded jquery-ui
155+ sdist_src = os .path .join (
156+ "lib/matplotlib/backends/web_backend" , "jquery-ui-1.12.1" )
157+ if os .path .exists (sdist_src ):
158+ shutil .copytree (sdist_src , os .path .join (dest , "jquery-ui-1.12.1" ))
159+ return
160+
150161 # Note: When bumping the jquery-ui version, also update the versions in
151162 # single_figure.html and all_figures.html.
152163 url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"
You can’t perform that action at this time.
0 commit comments