зеркало из https://github.com/electron/electron.git
Build the python requests library
This commit is contained in:
Родитель
e95ee4775e
Коммит
89b22db618
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e4d59bedfd3c7f4f254f4f5d036587bcd8152458
|
Загрузка…
Ссылка в новой задаче