def run(self):
if not self.has_npm():
log.error("`npm` unavailable. If you're running this command using sudo, make sure `npm` is available to sudo")
else:
env = os.environ.copy()
env['PATH'] = npm_path
log.info("Installing build dependencies with npm. This may take a while...")
check_call(["npm", "install"], cwd=jsroot, stdout=sys.stdout, stderr=sys.stderr, **prckws)
os.utime(node_modules, None)
for t in self.targets:
if not os.path.exists(t):
msg = "Missing file: %s" % t
if not self.has_npm():
msg += "\nnpm is required to build a development version of jupyter-" + name
raise ValueError(msg)
# update package data in case this created new files
update_package_data(self.distribution)
评论列表
文章目录