File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 1717import subprocess
1818import sys
1919
20+ WINDOWS = sys .platform .startswith ('win' )
21+
2022EXCLUDES = [os .path .normpath (x ) for x in '''
2123test/third_party
2224tools/maint
2527node_modules
2628Makefile
2729.git
30+ .circleci
31+ .github
32+ .mypy_cache
33+ .ruff_cache
2834cache
2935cache.lock
3036out
3137bootstrap.py
3238''' .split ()]
3339
40+ LAUNCHER_BAT_SCRIPTS = '''
41+ emcc.bat
42+ em++.bat
43+ bootstrap.bat
44+ ''' .split ()
45+
3446EXCLUDE_PATTERNS = '''
3547*.pyc
3648.*
@@ -50,6 +62,15 @@ def add_revision_file(target):
5062def copy_emscripten (target ):
5163 script_dir = os .path .dirname (os .path .abspath (__file__ ))
5264 emscripten_root = os .path .dirname (script_dir )
65+
66+ excludes = EXCLUDES
67+ # We have a few launcher scripts that are checked into git still.
68+ # Exclude the ones not designed for the current platforms.
69+ if WINDOWS :
70+ excludes += [os .path .splitext (l )[0 ] for l in LAUNCHER_BAT_SCRIPTS ]
71+ else :
72+ excludes += LAUNCHER_BAT_SCRIPTS
73+
5374 os .chdir (emscripten_root )
5475 for root , dirs , files in os .walk ('.' ):
5576 # Handle the case where the target directory is underneath emscripten_root
@@ -78,7 +99,7 @@ def copy_emscripten(target):
7899 logger .debug ('skipping file: ' + os .path .join (root , f ))
79100 continue
80101 full = os .path .normpath (os .path .join (root , f ))
81- if full in EXCLUDES :
102+ if full in excludes :
82103 logger .debug ('skipping file: ' + os .path .join (root , f ))
83104 continue
84105 logger .debug ('installing file: ' + os .path .join (root , f ))
You can’t perform that action at this time.
0 commit comments