include html frontend in packages/package_data

chmod +x ipython-notebook script
This commit is contained in:
MinRK 2011-05-03 15:21:03 -07:00 committed by Brian E. Granger
parent 9edf46f9dc
commit f7a3abb023

View File

@ -120,6 +120,8 @@ def find_packages():
add_package(packages, 'external.ssh')
add_package(packages, 'kernel')
add_package(packages, 'frontend')
add_package(packages, 'frontend.html')
add_package(packages, 'frontend.html.notebook')
add_package(packages, 'frontend.qt')
add_package(packages, 'frontend.qt.console', tests=True)
add_package(packages, 'frontend.terminal', tests=True)
@ -146,9 +148,21 @@ 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
# 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:
for f in files:
static_data.append(os.path.join(parent, f))
package_data = {
'IPython.config.profile' : ['README', '*/*.py'],
'IPython.testing' : ['*.txt'],
'IPython.frontend.html.notebook' : ['templates/*']+static_data
}
return package_data