##// END OF EJS Templates
jupyter_notebook path in setup base, gitignore
Min RK -
Show More
@@ -7,8 +7,8 b' docs/source/api/generated'
7 docs/source/config/options
7 docs/source/config/options
8 docs/source/interactive/magics-generated.txt
8 docs/source/interactive/magics-generated.txt
9 docs/gh-pages
9 docs/gh-pages
10 IPython/html/notebook/static/mathjax
10 jupyter_notebook/notebook/static/mathjax
11 IPython/html/static/style/*.map
11 jupyter_notebook/static/style/*.map
12 *.py[co]
12 *.py[co]
13 __pycache__
13 __pycache__
14 *.egg-info
14 *.egg-info
@@ -126,55 +126,55 b' def find_package_data():'
126
126
127 # exclude components and less from the walk;
127 # exclude components and less from the walk;
128 # we will build the components separately
128 # we will build the components separately
129 excludes = [
129 # excludes = [
130 pjoin('static', 'components'),
130 # pjoin('static', 'components'),
131 pjoin('static', '*', 'less'),
131 # pjoin('static', '*', 'less'),
132 ]
132 # ]
133
133 #
134 # walk notebook resources:
134 # # walk notebook resources:
135 cwd = os.getcwd()
135 # cwd = os.getcwd()
136 os.chdir(os.path.join('IPython', 'html'))
136 # os.chdir(os.path.join('IPython', 'html'))
137 static_data = []
137 # static_data = []
138 for parent, dirs, files in os.walk('static'):
138 # for parent, dirs, files in os.walk('static'):
139 if any(fnmatch(parent, pat) for pat in excludes):
139 # if any(fnmatch(parent, pat) for pat in excludes):
140 # prevent descending into subdirs
140 # # prevent descending into subdirs
141 dirs[:] = []
141 # dirs[:] = []
142 continue
142 # continue
143 for f in files:
143 # for f in files:
144 static_data.append(pjoin(parent, f))
144 # static_data.append(pjoin(parent, f))
145
145 #
146 components = pjoin("static", "components")
146 # components = pjoin("static", "components")
147 # select the components we actually need to install
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)
148 # # (there are lots of resources we bundle for sdist-reasons that we don't actually use)
149 static_data.extend([
149 # static_data.extend([
150 pjoin(components, "backbone", "backbone-min.js"),
150 # pjoin(components, "backbone", "backbone-min.js"),
151 pjoin(components, "bootstrap", "js", "bootstrap.min.js"),
151 # pjoin(components, "bootstrap", "js", "bootstrap.min.js"),
152 pjoin(components, "bootstrap-tour", "build", "css", "bootstrap-tour.min.css"),
152 # pjoin(components, "bootstrap-tour", "build", "css", "bootstrap-tour.min.css"),
153 pjoin(components, "bootstrap-tour", "build", "js", "bootstrap-tour.min.js"),
153 # pjoin(components, "bootstrap-tour", "build", "js", "bootstrap-tour.min.js"),
154 pjoin(components, "es6-promise", "*.js"),
154 # pjoin(components, "es6-promise", "*.js"),
155 pjoin(components, "font-awesome", "fonts", "*.*"),
155 # pjoin(components, "font-awesome", "fonts", "*.*"),
156 pjoin(components, "google-caja", "html-css-sanitizer-minified.js"),
156 # pjoin(components, "google-caja", "html-css-sanitizer-minified.js"),
157 pjoin(components, "jquery", "jquery.min.js"),
157 # pjoin(components, "jquery", "jquery.min.js"),
158 pjoin(components, "jquery-ui", "ui", "minified", "jquery-ui.min.js"),
158 # pjoin(components, "jquery-ui", "ui", "minified", "jquery-ui.min.js"),
159 pjoin(components, "jquery-ui", "themes", "smoothness", "jquery-ui.min.css"),
159 # pjoin(components, "jquery-ui", "themes", "smoothness", "jquery-ui.min.css"),
160 pjoin(components, "jquery-ui", "themes", "smoothness", "images", "*"),
160 # pjoin(components, "jquery-ui", "themes", "smoothness", "images", "*"),
161 pjoin(components, "marked", "lib", "marked.js"),
161 # pjoin(components, "marked", "lib", "marked.js"),
162 pjoin(components, "requirejs", "require.js"),
162 # pjoin(components, "requirejs", "require.js"),
163 pjoin(components, "underscore", "underscore-min.js"),
163 # pjoin(components, "underscore", "underscore-min.js"),
164 pjoin(components, "moment", "moment.js"),
164 # pjoin(components, "moment", "moment.js"),
165 pjoin(components, "moment", "min", "moment.min.js"),
165 # pjoin(components, "moment", "min", "moment.min.js"),
166 pjoin(components, "term.js", "src", "term.js"),
166 # pjoin(components, "term.js", "src", "term.js"),
167 pjoin(components, "text-encoding", "lib", "encoding.js"),
167 # pjoin(components, "text-encoding", "lib", "encoding.js"),
168 ])
168 # ])
169
169 #
170 # Ship all of Codemirror's CSS and JS
170 # # Ship all of Codemirror's CSS and JS
171 for parent, dirs, files in os.walk(pjoin(components, 'codemirror')):
171 # for parent, dirs, files in os.walk(pjoin(components, 'codemirror')):
172 for f in files:
172 # for f in files:
173 if f.endswith(('.js', '.css')):
173 # if f.endswith(('.js', '.css')):
174 static_data.append(pjoin(parent, f))
174 # static_data.append(pjoin(parent, f))
175
175 #
176 os.chdir(os.path.join('tests',))
176 # os.chdir(os.path.join('tests',))
177 js_tests = glob('*.js') + glob('*/*.js')
177 # js_tests = glob('*.js') + glob('*/*.js')
178
178
179 # nbconvert package_data:
179 # nbconvert package_data:
180 # os.chdir(os.path.join(cwd, 'IPython', 'nbconvert'))
180 # os.chdir(os.path.join(cwd, 'IPython', 'nbconvert'))
@@ -190,15 +190,15 b' def find_package_data():'
190 # ],
190 # ],
191 # }
191 # }
192
192
193 os.chdir(cwd)
193 # os.chdir(cwd)
194
194
195 package_data = {
195 package_data = {
196 'IPython.core' : ['profile/README*'],
196 'IPython.core' : ['profile/README*'],
197 'IPython.core.tests' : ['*.png', '*.jpg'],
197 'IPython.core.tests' : ['*.png', '*.jpg'],
198 'IPython.lib.tests' : ['*.wav'],
198 'IPython.lib.tests' : ['*.wav'],
199 'IPython.testing.plugin' : ['*.txt'],
199 'IPython.testing.plugin' : ['*.txt'],
200 'IPython.html' : ['templates/*'] + static_data,
200 # 'IPython.html' : ['templates/*'] + static_data,
201 'IPython.html.tests' : js_tests,
201 # 'IPython.html.tests' : js_tests,
202 # 'IPython.nbformat' : [
202 # 'IPython.nbformat' : [
203 # 'tests/*.ipynb',
203 # 'tests/*.ipynb',
204 # 'v3/nbformat.v3.schema.json',
204 # 'v3/nbformat.v3.schema.json',
@@ -706,7 +706,7 b' class CompileCSS(Command):'
706 if self.force:
706 if self.force:
707 cmd.append('--force')
707 cmd.append('--force')
708 try:
708 try:
709 p = Popen(cmd, cwd=pjoin(repo_root, "IPython", "html"), stderr=PIPE)
709 p = Popen(cmd, cwd=pjoin(repo_root, "jupyter_notebook"), stderr=PIPE)
710 except OSError:
710 except OSError:
711 raise DistutilsExecError("invoke is required to rebuild css (pip install invoke)")
711 raise DistutilsExecError("invoke is required to rebuild css (pip install invoke)")
712 out, err = p.communicate()
712 out, err = p.communicate()
@@ -728,7 +728,7 b' class JavascriptVersion(Command):'
728 pass
728 pass
729
729
730 def run(self):
730 def run(self):
731 nsfile = pjoin(repo_root, "IPython", "html", "static", "base", "js", "namespace.js")
731 nsfile = pjoin(repo_root, "jupyter_notebook", "static", "base", "js", "namespace.js")
732 with open(nsfile) as f:
732 with open(nsfile) as f:
733 lines = f.readlines()
733 lines = f.readlines()
734 with open(nsfile, 'w') as f:
734 with open(nsfile, 'w') as f:
General Comments 0
You need to be logged in to leave comments. Login now