-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconfigure.py
More file actions
25 lines (20 loc) · 741 Bytes
/
Copy pathconfigure.py
File metadata and controls
25 lines (20 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
import os
from util import ARCHITECTURES, env_vars, parse_args
def main():
args, remaining = parse_args()
os.environ.update(env_vars(args.target_arch_name, args.android_api_level))
# CPython requires explicit --build, and its value does not matter
# (e.g., x86_64-linux-gnu should also work on macOS)
cmd = [
'bash', './configure',
'--host=' + ARCHITECTURES[args.target_arch_name].ANDROID_TARGET,
'--build=x86_64-linux-gnu',
'--enable-shared',
'ac_cv_file__dev_ptmx=yes',
'ac_cv_file__dev_ptc=no',
'ac_cv_buggy_getaddrinfo=no', # for IPv6 functionality
]
os.execvp('bash', cmd + remaining)
if __name__ == '__main__':
main()