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

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

Issue 10500004: Die build.py, Die: Part 2 (LocalFetcher, Handlebar support, build script) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added parens Created 8 years, 6 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
new file mode 100755
index 0000000000000000000000000000000000000000..db9d869e358ef7d79ae9411753d16227ffbd60b0
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/build_server.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script is used to copy all dependencies into the local directory.
+# The package of files can then be uploaded to App Engine.
+import os
+import shutil
+import sys
+
+THIRD_PARTY_DIR = os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir,
+ os.pardir, os.pardir, 'third_party')
+LOCAL_THIRD_PARTY_DIR = os.path.join(sys.path[0], 'third_party')
+
+def main():
+ shutil.rmtree(LOCAL_THIRD_PARTY_DIR, True)
+ shutil.copytree(os.path.join(THIRD_PARTY_DIR, 'handlebar'),
+ os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar'))
+
+ with open(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'), 'w') as f:
+ os.utime(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'), None)
+
+ shutil.copy(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'),
+ os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar'))
+ with open(
+ os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar/__init__.py'), 'a') as f:
+ f.write('\nfrom handlebar import Handlebar\n')
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « chrome/common/extensions/docs/server2/branch_utility.py ('k') | chrome/common/extensions/docs/server2/echo_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698