浏览代码

Make the file check less brittle

Steven Silvester 8 年之前
父节点
当前提交
efe326b1aa
共有 1 个文件被更改,包括 5 次插入15 次删除
  1. 5 15
      setup.py

+ 5 - 15
setup.py

@@ -76,11 +76,6 @@ class bdist_egg_disabled(bdist_egg):
         sys.exit("Aborting implicit building of eggs. Use `pip install .` to install from source.")
 
 
-
-def get_target_path(target):
-    return os.path.join(here, 'jupyterlab', 'build', target)
-
-
 class NPM(Command):
     description = 'install package.json dependencies using npm'
 
@@ -89,16 +84,11 @@ class NPM(Command):
     node_modules = os.path.join(here, 'node_modules')
     jlab_node_modules = os.path.join(extension_root, 'node_modules')
 
-    targets = map(get_target_path, [
-        'codemirror.css', 'lab.css',
-        'main.css', 'vendor.css',
-        'codemirror.bundle.js', 'lab.bundle.js',
-        'main.bundle.js', 'phosphor.bundle.js',
-        'services.bundle.js', 'vendor.bundle.js',
-        'codemirror.bundle.js.map', 'lab.bundle.js.map',
-        'main.bundle.js.map', 'phosphor.bundle.js.map',
-        'services.bundle.js.map', 'vendor.bundle.js.map'
-    ])
+    # Representative files that should exist after a successful build
+    targets = [
+        os.path.join(here, 'jupyterlab', 'build', 'lab.css'),
+        os.path.join(here, 'jupyterlab', 'build', 'lab.bundle.js'),
+    ]
 
     def initialize_options(self):
         pass