|
35 | 35 |
|
36 | 36 | from setuptools import setup
|
37 | 37 | from setuptools.command.build_ext import build_ext as BuildExtCommand
|
38 |
| -from setuptools.command.develop import develop as DevelopCommand |
39 |
| -from setuptools.command.install_lib import install_lib as InstallLibCommand |
40 | 38 | from setuptools.command.test import test as TestCommand
|
41 | 39 |
|
42 | 40 | # The setuptools version of sdist adds a setup.cfg file to the tree.
|
@@ -146,53 +144,6 @@ def run(self):
|
146 | 144 | cmdclass['build_ext'] = BuildExtraLibraries
|
147 | 145 |
|
148 | 146 |
|
149 |
| -def _download_jquery_to(dest): |
150 |
| - # Note: When bumping the jquery-ui version, also update the versions in |
151 |
| - # single_figure.html and all_figures.html. |
152 |
| - url = "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip" |
153 |
| - sha = 'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d' |
154 |
| - if not os.path.exists(os.path.join(dest, "jquery-ui-1.12.1")): |
155 |
| - _makedirs(dest, exist_ok=True) |
156 |
| - try: |
157 |
| - buff = download_or_cache(url, sha) |
158 |
| - except Exception: |
159 |
| - raise IOError("Failed to download jquery-ui. Please download " + |
160 |
| - "{url} and extract it to {dest}.".format( |
161 |
| - url=url, dest=dest)) |
162 |
| - with ZipFile(buff) as zf: |
163 |
| - zf.extractall(dest) |
164 |
| - |
165 |
| - |
166 |
| -# Relying on versioneer's implementation detail. |
167 |
| -_orgin_sdist = cmdclass['sdist'] |
168 |
| - |
169 |
| - |
170 |
| -class sdist_with_jquery(_orgin_sdist): |
171 |
| - def make_release_tree(self, base_dir, files): |
172 |
| - _orgin_sdist.make_release_tree(self, base_dir, files) |
173 |
| - _download_jquery_to( |
174 |
| - os.path.join(base_dir, "lib/matplotlib/backends/web_backend/")) |
175 |
| - |
176 |
| - |
177 |
| -# Affects install and bdist_wheel. |
178 |
| -class install_lib_with_jquery(InstallLibCommand): |
179 |
| - def run(self): |
180 |
| - InstallLibCommand.run(self) |
181 |
| - _download_jquery_to( |
182 |
| - os.path.join(self.install_dir, "matplotlib/backends/web_backend/")) |
183 |
| - |
184 |
| - |
185 |
| -class develop_with_jquery(DevelopCommand): |
186 |
| - def run(self): |
187 |
| - DevelopCommand.run(self) |
188 |
| - _download_jquery_to("lib/matplotlib/backends/web_backend/") |
189 |
| - |
190 |
| - |
191 |
| -cmdclass['sdist'] = sdist_with_jquery |
192 |
| -cmdclass['install_lib'] = install_lib_with_jquery |
193 |
| -cmdclass['develop'] = develop_with_jquery |
194 |
| - |
195 |
| - |
196 | 147 | # One doesn't normally see `if __name__ == '__main__'` blocks in a setup.py,
|
197 | 148 | # however, this is needed on Windows to avoid creating infinite subprocesses
|
198 | 149 | # when using multiprocessing.
|
|
0 commit comments