-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathbuild_python.py
More file actions
29 lines (24 loc) · 757 Bytes
/
build_python.py
File metadata and controls
29 lines (24 loc) · 757 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
26
27
28
29
import argparse
import subprocess
import sys
import os
def main():
# Check if build.py exists in the current directory
if not os.path.exists("build.py"):
print("Error: build.py not found in the current directory")
sys.exit(1)
# Run build.py using subprocess
result = subprocess.run(["python", "build.py", "-l", "python"], capture_output=True, text=True)
# Check for errors
if result.returncode != 0:
print("Error: build.py execution failed")
print("Output:")
print(result.stdout)
print("Error message:")
print(result.stderr)
sys.exit(1)
# Print the output of build.py
print("build.py output:")
print(result.stdout)
if __name__ == "__main__":
main()