File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import os
2323from string import Template
2424import urllib .request
25+ import shutil
2526from zipfile import ZipFile
2627
2728from setuptools import setup , Extension
@@ -124,6 +125,16 @@ def build_extensions(self):
124125
125126
126127def _download_jquery_to (dest ):
128+ if os .path .exists (os .path .join (dest , "jquery-ui-1.12.1" )):
129+ return
130+
131+ # If we are installing from an sdist, use the already downloaded jquery-ui
132+ sdist_src = os .path .join (
133+ "lib/matplotlib/backends/web_backend" , "jquery-ui-1.12.1" )
134+ if os .path .exists (sdist_src ):
135+ shutil .copytree (sdist_src , os .path .join (dest , "jquery-ui-1.12.1" ))
136+ return
137+
127138 # Note: When bumping the jquery-ui version, also update the versions in
128139 # single_figure.html and all_figures.html.
129140 url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"
You can’t perform that action at this time.
0 commit comments