Show More
@@ -29,6 +29,7 b' from distutils.command.build_scripts import build_scripts' | |||||
29 | from distutils.command.install import install |
|
29 | from distutils.command.install import install | |
30 | from distutils.command.install_scripts import install_scripts |
|
30 | from distutils.command.install_scripts import install_scripts | |
31 | from distutils.cmd import Command |
|
31 | from distutils.cmd import Command | |
|
32 | from fnmatch import fnmatch | |||
32 | from glob import glob |
|
33 | from glob import glob | |
33 | from subprocess import call |
|
34 | from subprocess import call | |
34 |
|
35 | |||
@@ -127,22 +128,25 b' def find_package_data():' | |||||
127 | # This is not enough for these things to appear in an sdist. |
|
128 | # This is not enough for these things to appear in an sdist. | |
128 | # We need to muck with the MANIFEST to get this to work |
|
129 | # We need to muck with the MANIFEST to get this to work | |
129 |
|
130 | |||
130 |
# exclude components from the walk |
|
131 | # exclude components and less from the walk; | |
131 | # we will build the components separately |
|
132 | # we will build the components separately | |
132 |
excludes = [ |
|
133 | excludes = [ | |
133 |
|
134 | pjoin('static', 'components'), | ||
134 | # add 'static/' prefix to exclusions, and tuplify for use in startswith |
|
135 | pjoin('static', '*', 'less'), | |
135 | excludes = tuple([pjoin('static', ex) for ex in excludes]) |
|
136 | ] | |
136 |
|
137 | |||
137 | # walk notebook resources: |
|
138 | # walk notebook resources: | |
138 | cwd = os.getcwd() |
|
139 | cwd = os.getcwd() | |
139 | os.chdir(os.path.join('IPython', 'html')) |
|
140 | os.chdir(os.path.join('IPython', 'html')) | |
140 | static_data = [] |
|
141 | static_data = [] | |
141 | for parent, dirs, files in os.walk('static'): |
|
142 | for parent, dirs, files in os.walk('static'): | |
142 |
if parent |
|
143 | if any(fnmatch(parent, pat) for pat in excludes): | |
|
144 | # prevent descending into subdirs | |||
|
145 | dirs[:] = [] | |||
143 | continue |
|
146 | continue | |
144 | for f in files: |
|
147 | for f in files: | |
145 | static_data.append(pjoin(parent, f)) |
|
148 | static_data.append(pjoin(parent, f)) | |
|
149 | ||||
146 | components = pjoin("static", "components") |
|
150 | components = pjoin("static", "components") | |
147 | # select the components we actually need to install |
|
151 | # 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) |
|
152 | # (there are lots of resources we bundle for sdist-reasons that we don't actually use) |
General Comments 0
You need to be logged in to leave comments.
Login now