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

Unified Diff: tools/dom/scripts/dartdomgenerator.py

Issue 569783002: Migrate to Chrome 37 IDL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/databasebuilder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartdomgenerator.py
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index 53b2132b77d034ff3866f3bb5f3062d3e8540019..896bb2588faa0057112dab3db78593de4261eb3a 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -10,10 +10,27 @@ import os
import sys
# Setup all paths to find our PYTHON code
+
+# dart_dir is the location of dart's enlistment dartium (dartium-git/src/dart)
+# and Dart (dart-git/dart).
dart_dir = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
sys.path.insert(1, os.path.join(dart_dir, 'tools/dom/new_scripts'))
sys.path.insert(1, os.path.join(dart_dir, 'third_party/WebCore/bindings/scripts'))
-sys.path.insert(1, os.path.join(dart_dir, 'third_party'))
+
+# Dartium's third_party directory location is dartium-git/src/third_party
+# and Dart's third_party directory location is dart-git/dart/third_party.
+third_party_dir = os.path.join(dart_dir, 'third_party')
+
+ply_dir = os.path.join(third_party_dir, 'ply')
+# If ply directory found then we're a Dart enlistment; third_party location
+# is dart-git/dart/third_party
+if not os.path.exists(ply_dir):
+ # For Dartium (ply directory is dartium-git/src/third_party/ply) third_party
+ # location is dartium-git/src/third_party
+ third_party_dir = os.path.join(dart_dir, '..', 'third_party')
+ assert(os.path.exists(third_party_dir))
+sys.path.insert(1, third_party_dir)
+
sys.path.insert(1, os.path.join(dart_dir, 'tools/dom/scripts'))
import dartgenerator
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/databasebuilder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698