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

Side by Side 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: TemplateFetcher now has dictionary interface 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # This script is used to copy all dependencies into the local directory.
7 # The package of files can then be uploaded to App Engine.
8 import os
9 import shutil
10 import sys
11
12 THIRD_PARTY_DIR = os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir,
13 os.pardir, os.pardir, 'third_party')
14 LOCAL_THIRD_PARTY_DIR = os.path.join(sys.path[0], 'third_party')
15
16 def main():
17 shutil.rmtree(LOCAL_THIRD_PARTY_DIR, True)
18 shutil.copytree(os.path.join(THIRD_PARTY_DIR, 'handlebar'),
19 os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar'))
20
21 with open(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'), 'w') as f:
22 os.utime(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'), None)
23
24 shutil.copy(os.path.join(LOCAL_THIRD_PARTY_DIR, '__init__.py'),
25 os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar'))
26 with open(
27 os.path.join(LOCAL_THIRD_PARTY_DIR, 'handlebar/__init__.py'), 'a') as f:
28 f.write('\nfrom handlebar import Handlebar\n')
29
30 if __name__ == '__main__':
31 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698