Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2624)

Unified Diff: build_apprtc_closure.py

Issue 879763004: Workaround long paths on Windows by excluding the offending component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webrtc/webrtc.DEPS/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_apprtc_closure.py
===================================================================
--- build_apprtc_closure.py (revision 293823)
+++ build_apprtc_closure.py (working copy)
@@ -9,6 +9,7 @@
the node toolchain we downloaded earlier.
"""
+import fileinput
import os
import shutil
import sys
@@ -16,6 +17,17 @@
import utils
+# Phantomjs generates very deep paths in the node_modules structure and
+# Windows can't deal with that, so just hack that out.
+def _WorkaroundPhantomJsOnWin(samples_path):
+ if utils.GetPlatform() is 'win':
+ package_json = os.path.join(samples_path, 'package.json')
+
+ for line in fileinput.input(package_json, inplace=True):
kjellander_chromium 2015/01/27 21:00:30 Ha, I didn't know about this module. Very neat for
phoglund_chromium 2015/01/28 08:29:02 It is short, but it's really, really strange that
+ if not 'phantomjs' in line:
+ print line
+
+
def main():
node_path = os.path.abspath('node')
if not os.path.exists(node_path):
@@ -25,6 +37,7 @@
return 'Expected webrtc-samples at %s.' % os.path.abspath(samples_path)
os.chdir(samples_path)
+ _WorkaroundPhantomJsOnWin(samples_path)
if utils.GetPlatform() is 'win':
npm_bin = os.path.join(node_path, 'npm.cmd')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698