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

Unified Diff: chrome/common/extensions/docs/server2/build_server.py

Issue 11079010: Extensions Docs Server: Preserve JSON declaration order in extensions documentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more efficient ordered_dict Created 8 years, 2 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
Index: chrome/common/extensions/docs/server2/build_server.py
diff --git a/chrome/common/extensions/docs/server2/build_server.py b/chrome/common/extensions/docs/server2/build_server.py
index 5a99253e70e9247a5c9c812398c5d8a261007c31..a6d6d690b33ba7ec6a80e163648f210174dd2a0e 100755
--- a/chrome/common/extensions/docs/server2/build_server.py
+++ b/chrome/common/extensions/docs/server2/build_server.py
@@ -15,7 +15,11 @@ SRC_DIR = os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir, os.pardir,
THIRD_PARTY_DIR = os.path.join(SRC_DIR, 'third_party')
LOCAL_THIRD_PARTY_DIR = os.path.join(sys.path[0], 'third_party')
TOOLS_DIR = os.path.join(SRC_DIR, 'tools')
-SCHEMA_COMPILER_FILES = ['model.py', 'idl_schema.py', 'schema_util.py']
+SCHEMA_COMPILER_FILES = ['model.py',
+ 'idl_schema.py',
+ 'schema_util.py',
+ 'ordered_dict.py',
+ 'json_parse.py']
def MakeInit(path):
path = os.path.join(path, '__init__.py')
@@ -26,17 +30,19 @@ def OnError(function, path, excinfo):
os.chmod(path, stat.S_IWUSR)
function(path)
-def CopyThirdParty(src, dest, files=None):
+def CopyThirdParty(src, dest, files=None, make_init=True):
dest_path = os.path.join(LOCAL_THIRD_PARTY_DIR, dest)
if not files:
shutil.copytree(src, dest_path)
- MakeInit(dest_path)
+ if make_init:
+ MakeInit(dest_path)
return
try:
os.makedirs(dest_path)
except Exception:
pass
- MakeInit(dest_path)
+ if make_init:
+ MakeInit(dest_path)
for filename in files:
shutil.copy(os.path.join(src, filename), os.path.join(dest_path, filename))

Powered by Google App Engine
This is Rietveld 408576698