You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-03-31 14:42:53 -07:00
38 lines
687 B
Python
Executable File
38 lines
687 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# This is a small script that intercepts the build command, and
|
|
# applies it to multiple directories, in parallel.
|
|
|
|
|
|
import multiprocessing.dummy
|
|
import subprocess
|
|
import sys
|
|
|
|
sys.path.insert(0, "development-support")
|
|
|
|
import _install_tool
|
|
|
|
jobs = int(sys.argv[1])
|
|
cmd = sys.argv[2:]
|
|
dirs = ["pyobjc-core"] + _install_tool.sort_framework_wrappers()
|
|
|
|
failed = []
|
|
|
|
print(f"ALL FRAMEWORKS: {dirs}")
|
|
|
|
def build(dirpath):
|
|
r = subprocess.run(
|
|
cmd,
|
|
cwd=dirpath,
|
|
check=dirpath == "pyobjc-core",
|
|
)
|
|
|
|
if not r:
|
|
failed.append(dirpath)
|
|
|
|
|
|
with multiprocessing.dummy.Pool(jobs) as p:
|
|
p.map(build, dirs)
|
|
|
|
print("FAILED:", *failed)
|