Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aa0a84f

Browse filesBrowse files
committed
Don't redownload jquery when installing from an sdist
Closes #14585
1 parent 667a100 commit aa0a84f
Copy full SHA for aa0a84f

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
sys.exit(error)
2222

2323
import os
24+
import shutil
2425
from zipfile import ZipFile
2526

2627
from setuptools import setup, find_packages, Extension
@@ -115,6 +116,16 @@ def build_extensions(self):
115116

116117

117118
def _download_jquery_to(dest):
119+
if os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")):
120+
return
121+
122+
# If we are installing from an sdist, use the already downloaded jquery-ui
123+
sdist_src = os.path.join(
124+
"lib/matplotlib/backends/web_backend", "jquery-ui-1.12.1")
125+
if os.path.exists(sdist_src):
126+
shutil.copytree(sdist_src, os.path.join(dest, "jquery-ui-1.12.1"))
127+
return
128+
118129
# Note: When bumping the jquery-ui version, also update the versions in
119130
# single_figure.html and all_figures.html.
120131
url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.