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

Side by Side Diff: chrome/common/extensions/docs/server2/build_server.py

Issue 344453003: Docserver: separate models for apps and extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase/Add comment Created 6 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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script is used to copy all dependencies into the local directory. 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. 7 # The package of files can then be uploaded to App Engine.
8 import os 8 import os
9 import shutil 9 import shutil
10 import stat 10 import stat
11 import sys 11 import sys
12 12
13 SRC_DIR = os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir, os.pardir, 13 SRC_DIR = os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir, os.pardir,
14 os.pardir) 14 os.pardir)
15 THIRD_PARTY_DIR = os.path.join(SRC_DIR, 'third_party') 15 THIRD_PARTY_DIR = os.path.join(SRC_DIR, 'third_party')
16 LOCAL_THIRD_PARTY_DIR = os.path.join(sys.path[0], 'third_party') 16 LOCAL_THIRD_PARTY_DIR = os.path.join(sys.path[0], 'third_party')
17 TOOLS_DIR = os.path.join(SRC_DIR, 'tools') 17 TOOLS_DIR = os.path.join(SRC_DIR, 'tools')
18 SCHEMA_COMPILER_FILES = ['memoize.py', 18 SCHEMA_COMPILER_FILES = ['memoize.py',
19 'model.py', 19 'model.py',
20 'idl_schema.py', 20 'idl_schema.py',
21 'schema_util.py', 21 'schema_util.py',
22 'json_parse.py'] 22 'json_parse.py',
23 'json_schema.py']
23 24
24 def MakeInit(path): 25 def MakeInit(path):
25 path = os.path.join(path, '__init__.py') 26 path = os.path.join(path, '__init__.py')
26 with open(os.path.join(path), 'w') as f: 27 with open(os.path.join(path), 'w') as f:
27 os.utime(os.path.join(path), None) 28 os.utime(os.path.join(path), None)
28 29
29 def OnError(function, path, excinfo): 30 def OnError(function, path, excinfo):
30 os.chmod(path, stat.S_IWUSR) 31 os.chmod(path, stat.S_IWUSR)
31 function(path) 32 function(path)
32 33
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 'cloudstorage'), 'cloudstorage') 80 'cloudstorage'), 'cloudstorage')
80 81
81 # To be able to use the Handlebar class we need this import in __init__.py. 82 # To be able to use the Handlebar class we need this import in __init__.py.
82 with open(os.path.join(LOCAL_THIRD_PARTY_DIR, 83 with open(os.path.join(LOCAL_THIRD_PARTY_DIR,
83 'handlebar', 84 'handlebar',
84 '__init__.py'), 'a') as f: 85 '__init__.py'), 'a') as f:
85 f.write('from handlebar import Handlebar\n') 86 f.write('from handlebar import Handlebar\n')
86 87
87 if __name__ == '__main__': 88 if __name__ == '__main__':
88 main() 89 main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/availability_finder_test.py ('k') | chrome/common/extensions/docs/server2/cron.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698