Permalink
Browse files

exclude mathjax from notebook package_data

closes #1018
  • Loading branch information...
1 parent a7d609a commit 9f9956919aca2907b8a0ce6793ad31c099e4527c @minrk minrk committed Dec 6, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 setupbase.py
View
@@ -120,14 +120,22 @@ def find_package_data():
"""
# This is not enough for these things to appear in an sdist.
# We need to muck with the MANIFEST to get this to work
-
+
+ # exclude static things that we don't ship (e.g. mathjax)
+ excludes = ['mathjax']
+
+ # add 'static/' prefix to exclusions, and tuplify for use in startswith
+ excludes = tuple([os.path.join('static', ex) for ex in excludes])
+
# walk notebook resources:
cwd = os.getcwd()
os.chdir(os.path.join('IPython', 'frontend', 'html', 'notebook'))
static_walk = list(os.walk('static'))
os.chdir(cwd)
static_data = []
for parent, dirs, files in static_walk:
+ if parent.startswith(excludes):
+ continue
for f in files:
static_data.append(os.path.join(parent, f))

0 comments on commit 9f99569

Please sign in to comment.