Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d11ab35

Browse files
authored
Merge pull request #14987 from tacaswell/auto-backport-of-pr-14915-on-v3.1.x
BLD: use jquery in sdist when installing from sdist Merge pull request #14915 from AWhetter/fix_14585
2 parents 7a28d15 + 2ea3a0b commit d11ab35

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import os
2323
from string import Template
2424
import urllib.request
25+
import shutil
2526
from zipfile import ZipFile
2627

2728
from setuptools import setup, Extension
@@ -124,6 +125,16 @@ def build_extensions(self):
124125

125126

126127
def _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"

0 commit comments

Comments
 (0)