diff --git a/.gitmodules b/.gitmodules index 7c26c6c2c1..5517d4434f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "vendor/crashpad"] path = vendor/crashpad url = https://github.com/atom/crashpad.git +[submodule "vendor/requests"] + path = vendor/requests + url = https://github.com/kennethreitz/requests diff --git a/script/bootstrap.py b/script/bootstrap.py index fd9958d9ca..94a566224c 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -37,6 +37,7 @@ def main(): update_clang() update_submodules() + setup_requests() update_node_modules('.') bootstrap_brightray(args.dev, args.url, args.target_arch) @@ -84,6 +85,11 @@ def update_submodules(): execute_stdout(['git', 'submodule', 'update', '--init', '--recursive']) +def setup_requests(): + with scoped_cwd(os.path.join(VENDOR_DIR, 'requests')): + execute_stdout([sys.executable, 'setup.py', 'build']) + + def bootstrap_brightray(is_dev, url, target_arch): bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap') args = [ @@ -109,7 +115,7 @@ def update_node_modules(dirname, env=None): with scoped_cwd(dirname): args = [NPM, 'install'] if is_verbose_mode(): - args += '--verbose' + args += ['--verbose'] # Ignore npm install errors when running in CI. if os.environ.has_key('CI'): try: diff --git a/script/lib/github.py b/script/lib/github.py index a742a209c1..5e968d6698 100644 --- a/script/lib/github.py +++ b/script/lib/github.py @@ -1,7 +1,13 @@ #!/usr/bin/env python import json +import os import re +import sys + +sys.path.append(os.path.abspath(os.path.join(__file__, '..', '..', '..', + 'vendor', 'requests', 'build', + 'lib'))) import requests GITHUB_URL = 'https://api.github.com' diff --git a/vendor/requests b/vendor/requests new file mode 160000 index 0000000000..e4d59bedfd --- /dev/null +++ b/vendor/requests @@ -0,0 +1 @@ +Subproject commit e4d59bedfd3c7f4f254f4f5d036587bcd8152458