Package: apachedex / 1.6.3-1

do-not-use-embedded-js.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From: Arnaud Fontaine <arnau@debian.org>
Date: Tue, 22 Jan 2019 15:45:14 +0900
Subject: Use libjs-jquery* packages when available rather than embedded ones

Forwarded: not-needed
---
 setup.py | 52 ++--------------------------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)

diff --git a/setup.py b/setup.py
index 1cd84ed..6bac3bf 100644
--- a/setup.py
+++ b/setup.py
@@ -1,60 +1,12 @@
-from os.path import join, exists
+from os.path import join
 from setuptools import setup, find_packages
-import hashlib
 import os
 import sys
 extra = {}
 if sys.version_info >= (3, ):
   extra['use_2to3'] = True
-  from urllib.request import urlretrieve
-else:
-  from urllib import urlretrieve
-
-FLOT_SHA = 'aefe4e729b2d14efe6e8c0db359cb0e9aa6aae52'
-FLOT_AXISLABELS_SHA = '80453cd7fb8a9cad084cf6b581034ada3339dbf8'
-JQUERY_VERSION = '1.9.1'
-JQUERY_UI_VERSION = '1.10.2'
-
-DEPS = {
-  'jquery.flot.js': (
-    'http://raw.github.com/flot/flot/%s/jquery.flot.js' % FLOT_SHA,
-    '7b599c575f19c33bf0d93a6bbac3af02',
-  ),
-  'jquery.flot.time.js': (
-    'http://raw.github.com/flot/flot/%s/jquery.flot.time.js' % FLOT_SHA,
-    'c0aec1608bf2fbb79f24d1905673e2c3',
-  ),
-  'jquery.flot.axislabels.js': (
-    'http://raw.github.com/markrcote/flot-axislabels/%s/'
-      'jquery.flot.axislabels.js' % FLOT_AXISLABELS_SHA,
-    'a8526e0c1ed3b5cbc1a6b3ebb22bf334',
-  ),
-  'jquery.js': (
-    'http://code.jquery.com/jquery-%s.min.js' % JQUERY_VERSION,
-    '397754ba49e9e0cf4e7c190da78dda05',
-  ),
-  'jquery-ui.js': (
-    'http://code.jquery.com/ui/%s/jquery-ui.min.js' % JQUERY_UI_VERSION,
-    '3e6acb1e6426ef90d2e786a006a4ea28',
-  ),
-}
 
 _file_dirname = os.path.dirname(__file__)
-
-def download(url, filename, hexdigest):
-  filename = join(_file_dirname, 'apachedex', filename)
-  if not exists(filename):
-    urlretrieve(url, filename)
-  if hashlib.md5(open(filename, 'rb').read()).hexdigest() != hexdigest:
-    raise EnvironmentError('Checksum mismatch downloading %r' % filename)
-
-for filename, (url, hexdigest) in DEPS.items():
-  download(url, filename, hexdigest)
-
-# XXX: turn this into a setuptool command ?
-if sys.argv[1:] == ['deps']:
-  sys.exit(0)
-
 description = open(join(_file_dirname, 'README.rst')).read()
 
 setup(
@@ -86,7 +38,7 @@ setup(
     ],
   },
   package_data={
-    'apachedex': list(DEPS.keys()) + ['apachedex.js', 'apachedex.css'],
+    'apachedex': ['apachedex.js', 'apachedex.css'],
   },
   zip_safe=True,
   **extra