Skip to content

Commit

Permalink
Merge pull request #1367 from blink1073/jupyterlab-failsafe
Browse files Browse the repository at this point in the history
Allow JupyterLab to fail gracefully on install
  • Loading branch information
minrk committed Apr 19, 2016
2 parents f75e591 + 0176f72 commit 89f9420
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def check_package_data(package_data):
pkg_root = pjoin(*pkg.split('.'))
for d in data:
path = pjoin(pkg_root, d)
if '*' in path:
if 'lab/build' in path: # Do not verify lab install yet
continue
elif '*' in path:
assert len(glob(path)) > 0, "No files match pattern %s" % path
else:
assert os.path.exists(path), "Missing package data: %s" % path
Expand Down Expand Up @@ -363,9 +365,7 @@ def run(self):
run(['npm', 'install', '--progress=false'], cwd=self.lab_dir)
run(['npm', 'run', 'build'], cwd=self.lab_dir)
except Exception as e:
print("Failed to run `npm install`: %s" % e, file=sys.stderr)
print("You can install js dependencies with `npm install`", file=sys.stderr)
raise
print("Failed to install JupyterLab`: %s" % e, file=sys.stderr)

# update package data in case this created new files
update_package_data(self.distribution)
Expand Down

0 comments on commit 89f9420

Please sign in to comment.