##// END OF EJS Templates
whitelist installed components...
MinRK -
Show More
@@ -127,23 +127,44 b' def find_package_data():'
127 127 # This is not enough for these things to appear in an sdist.
128 128 # We need to muck with the MANIFEST to get this to work
129 129
130 # exclude static things that we don't ship (e.g. mathjax)
131 excludes = ['mathjax']
130 # exclude components from the walk,
131 # we will build the components separately
132 excludes = ['components']
132 133
133 134 # add 'static/' prefix to exclusions, and tuplify for use in startswith
134 excludes = tuple([os.path.join('static', ex) for ex in excludes])
135 excludes = tuple([pjoin('static', ex) for ex in excludes])
135 136
136 137 # walk notebook resources:
137 138 cwd = os.getcwd()
138 139 os.chdir(os.path.join('IPython', 'html'))
139 static_walk = list(os.walk('static'))
140 140 static_data = []
141 for parent, dirs, files in static_walk:
141 for parent, dirs, files in os.walk('static'):
142 142 if parent.startswith(excludes):
143 143 continue
144 144 for f in files:
145 static_data.append(os.path.join(parent, f))
146
145 static_data.append(pjoin(parent, f))
146 components = pjoin("static", "components")
147 # select the components we actually need to install
148 # (there are lots of resources we bundle for sdist-reasons that we don't actually use)
149 static_data.extend([
150 pjoin(components, "backbone", "backbone-min.js"),
151 pjoin(components, "bootstrap", "bootstrap", "js", "bootstrap.min.js"),
152 pjoin(components, "font-awesome", "build", "assets", "font", "*.*"),
153 pjoin(components, "highlight.js", "build", "highlight.pack.js"),
154 pjoin(components, "jquery", "jquery.min.js"),
155 pjoin(components, "jquery-ui", "ui", "minified", "jquery-ui.min.js"),
156 pjoin(components, "jquery-ui", "themes", "smoothness", "jquery-ui.min.css"),
157 pjoin(components, "marked", "lib", "marked.js"),
158 pjoin(components, "require", "require.js"),
159 pjoin(components, "underscore", "underscore-min.js"),
160 ])
161
162 # Ship all of Codemirror's CSS and JS
163 for parent, dirs, files in os.walk(pjoin(components, 'codemirror')):
164 for f in files:
165 if f.endswith(('.js', '.css')):
166 static_data.append(pjoin(parent, f))
167
147 168 os.chdir(os.path.join('tests',))
148 169 js_tests = glob('casperjs/*.*') + glob('casperjs/*/*')
149 170
General Comments 0
You need to be logged in to leave comments. Login now