Skip to content

Commit 70987a9

Browse files
committed
Checkout boto in our repo
1 parent 5c85c2e commit 70987a9

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
[submodule "vendor/requests"]
2020
path = vendor/requests
2121
url = https://github.com/kennethreitz/requests
22+
[submodule "vendor/boto"]
23+
path = vendor/boto
24+
url = https://github.com/boto/boto.git

script/bootstrap.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main():
3737
update_clang()
3838

3939
update_submodules()
40-
setup_requests()
40+
setup_python_libs()
4141
update_node_modules('.')
4242
bootstrap_brightray(args.dev, args.url, args.target_arch)
4343

@@ -85,9 +85,10 @@ def update_submodules():
8585
execute_stdout(['git', 'submodule', 'update', '--init', '--recursive'])
8686

8787

88-
def setup_requests():
89-
with scoped_cwd(os.path.join(VENDOR_DIR, 'requests')):
90-
execute_stdout([sys.executable, 'setup.py', 'build'])
88+
def setup_python_libs():
89+
for lib in ('requests', 'boto'):
90+
with scoped_cwd(os.path.join(VENDOR_DIR, lib)):
91+
execute_stdout([sys.executable, 'setup.py', 'build'])
9192

9293

9394
def bootstrap_brightray(is_dev, url, target_arch):

script/lib/util.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,18 @@ def parse_version(version):
209209

210210

211211
def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
212+
env = os.environ.copy()
213+
BOTO_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'vendor',
214+
'boto'))
215+
env['PYTHONPATH'] = os.path.pathsep.join([
216+
env.get('PYTHONPATH', ''),
217+
os.path.join(BOTO_DIR, 'build', 'lib'),
218+
os.path.join(BOTO_DIR, 'build', 'lib.linux-x86_64-2.7')])
219+
220+
boto = os.path.join(BOTO_DIR, 'bin', 's3put')
212221
args = [
213-
's3put',
222+
sys.executable,
223+
boto,
214224
'--bucket', bucket,
215225
'--access_key', access_key,
216226
'--secret_key', secret_key,
@@ -219,4 +229,4 @@ def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
219229
'--grant', 'public-read'
220230
] + files
221231

222-
execute(args)
232+
execute(args, env)

vendor/boto

Submodule boto added at f7574aa

0 commit comments

Comments
 (0)