Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30ffff9

Browse files
committed
jupyter_notebook path in setup base, gitignore
1 parent 633a65e commit 30ffff9

2 files changed

Lines changed: 56 additions & 56 deletions

File tree

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ docs/source/api/generated
77
docs/source/config/options
88
docs/source/interactive/magics-generated.txt
99
docs/gh-pages
10-
IPython/html/notebook/static/mathjax
11-
IPython/html/static/style/*.map
10+
jupyter_notebook/notebook/static/mathjax
11+
jupyter_notebook/static/style/*.map
1212
*.py[co]
1313
__pycache__
1414
*.egg-info

setupbase.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -126,55 +126,55 @@ def find_package_data():
126126

127127
# exclude components and less from the walk;
128128
# we will build the components separately
129-
excludes = [
130-
pjoin('static', 'components'),
131-
pjoin('static', '*', 'less'),
132-
]
133-
134-
# walk notebook resources:
135-
cwd = os.getcwd()
136-
os.chdir(os.path.join('IPython', 'html'))
137-
static_data = []
138-
for parent, dirs, files in os.walk('static'):
139-
if any(fnmatch(parent, pat) for pat in excludes):
140-
# prevent descending into subdirs
141-
dirs[:] = []
142-
continue
143-
for f in files:
144-
static_data.append(pjoin(parent, f))
145-
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", "js", "bootstrap.min.js"),
152-
pjoin(components, "bootstrap-tour", "build", "css", "bootstrap-tour.min.css"),
153-
pjoin(components, "bootstrap-tour", "build", "js", "bootstrap-tour.min.js"),
154-
pjoin(components, "es6-promise", "*.js"),
155-
pjoin(components, "font-awesome", "fonts", "*.*"),
156-
pjoin(components, "google-caja", "html-css-sanitizer-minified.js"),
157-
pjoin(components, "jquery", "jquery.min.js"),
158-
pjoin(components, "jquery-ui", "ui", "minified", "jquery-ui.min.js"),
159-
pjoin(components, "jquery-ui", "themes", "smoothness", "jquery-ui.min.css"),
160-
pjoin(components, "jquery-ui", "themes", "smoothness", "images", "*"),
161-
pjoin(components, "marked", "lib", "marked.js"),
162-
pjoin(components, "requirejs", "require.js"),
163-
pjoin(components, "underscore", "underscore-min.js"),
164-
pjoin(components, "moment", "moment.js"),
165-
pjoin(components, "moment", "min", "moment.min.js"),
166-
pjoin(components, "term.js", "src", "term.js"),
167-
pjoin(components, "text-encoding", "lib", "encoding.js"),
168-
])
169-
170-
# Ship all of Codemirror's CSS and JS
171-
for parent, dirs, files in os.walk(pjoin(components, 'codemirror')):
172-
for f in files:
173-
if f.endswith(('.js', '.css')):
174-
static_data.append(pjoin(parent, f))
175-
176-
os.chdir(os.path.join('tests',))
177-
js_tests = glob('*.js') + glob('*/*.js')
129+
# excludes = [
130+
# pjoin('static', 'components'),
131+
# pjoin('static', '*', 'less'),
132+
# ]
133+
#
134+
# # walk notebook resources:
135+
# cwd = os.getcwd()
136+
# os.chdir(os.path.join('IPython', 'html'))
137+
# static_data = []
138+
# for parent, dirs, files in os.walk('static'):
139+
# if any(fnmatch(parent, pat) for pat in excludes):
140+
# # prevent descending into subdirs
141+
# dirs[:] = []
142+
# continue
143+
# for f in files:
144+
# static_data.append(pjoin(parent, f))
145+
#
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", "js", "bootstrap.min.js"),
152+
# pjoin(components, "bootstrap-tour", "build", "css", "bootstrap-tour.min.css"),
153+
# pjoin(components, "bootstrap-tour", "build", "js", "bootstrap-tour.min.js"),
154+
# pjoin(components, "es6-promise", "*.js"),
155+
# pjoin(components, "font-awesome", "fonts", "*.*"),
156+
# pjoin(components, "google-caja", "html-css-sanitizer-minified.js"),
157+
# pjoin(components, "jquery", "jquery.min.js"),
158+
# pjoin(components, "jquery-ui", "ui", "minified", "jquery-ui.min.js"),
159+
# pjoin(components, "jquery-ui", "themes", "smoothness", "jquery-ui.min.css"),
160+
# pjoin(components, "jquery-ui", "themes", "smoothness", "images", "*"),
161+
# pjoin(components, "marked", "lib", "marked.js"),
162+
# pjoin(components, "requirejs", "require.js"),
163+
# pjoin(components, "underscore", "underscore-min.js"),
164+
# pjoin(components, "moment", "moment.js"),
165+
# pjoin(components, "moment", "min", "moment.min.js"),
166+
# pjoin(components, "term.js", "src", "term.js"),
167+
# pjoin(components, "text-encoding", "lib", "encoding.js"),
168+
# ])
169+
#
170+
# # Ship all of Codemirror's CSS and JS
171+
# for parent, dirs, files in os.walk(pjoin(components, 'codemirror')):
172+
# for f in files:
173+
# if f.endswith(('.js', '.css')):
174+
# static_data.append(pjoin(parent, f))
175+
#
176+
# os.chdir(os.path.join('tests',))
177+
# js_tests = glob('*.js') + glob('*/*.js')
178178

179179
# nbconvert package_data:
180180
# os.chdir(os.path.join(cwd, 'IPython', 'nbconvert'))
@@ -190,15 +190,15 @@ def find_package_data():
190190
# ],
191191
# }
192192

193-
os.chdir(cwd)
193+
# os.chdir(cwd)
194194

195195
package_data = {
196196
'IPython.core' : ['profile/README*'],
197197
'IPython.core.tests' : ['*.png', '*.jpg'],
198198
'IPython.lib.tests' : ['*.wav'],
199199
'IPython.testing.plugin' : ['*.txt'],
200-
'IPython.html' : ['templates/*'] + static_data,
201-
'IPython.html.tests' : js_tests,
200+
# 'IPython.html' : ['templates/*'] + static_data,
201+
# 'IPython.html.tests' : js_tests,
202202
# 'IPython.nbformat' : [
203203
# 'tests/*.ipynb',
204204
# 'v3/nbformat.v3.schema.json',
@@ -706,7 +706,7 @@ def run(self):
706706
if self.force:
707707
cmd.append('--force')
708708
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)
710710
except OSError:
711711
raise DistutilsExecError("invoke is required to rebuild css (pip install invoke)")
712712
out, err = p.communicate()
@@ -728,7 +728,7 @@ def finalize_options(self):
728728
pass
729729

730730
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")
732732
with open(nsfile) as f:
733733
lines = f.readlines()
734734
with open(nsfile, 'w') as f:

0 commit comments

Comments
 (0)