Checkout boto in our repo

This commit is contained in:
Cheng Zhao 2015-07-03 22:52:26 +08:00
parent 5c85c2e5d5
commit 70987a9029
4 changed files with 21 additions and 6 deletions

View file

@ -209,8 +209,18 @@ def parse_version(version):
def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
env = os.environ.copy()
BOTO_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'vendor',
'boto'))
env['PYTHONPATH'] = os.path.pathsep.join([
env.get('PYTHONPATH', ''),
os.path.join(BOTO_DIR, 'build', 'lib'),
os.path.join(BOTO_DIR, 'build', 'lib.linux-x86_64-2.7')])
boto = os.path.join(BOTO_DIR, 'bin', 's3put')
args = [
's3put',
sys.executable,
boto,
'--bucket', bucket,
'--access_key', access_key,
'--secret_key', secret_key,
@ -219,4 +229,4 @@ def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
'--grant', 'public-read'
] + files
execute(args)
execute(args, env)