(xcodeproj_dirs: list[Path])
| 487 | |
| 488 | def create_plugins(pages: list[str] | str | None = None, codesigner: CodeSign | None = None): |
| 489 | def _build_xcode_projects(xcodeproj_dirs: list[Path]): |
| 490 | xcodebuild = shutil.which("xcodebuild") |
| 491 | if not xcodebuild: |
| 492 | raise RuntimeError( |
| 493 | "Plugin directory contains an uncompiled project, but xcodebuild is not available." |
| 494 | ) |
| 495 | try: |
| 496 | subprocess.run([xcodebuild, "--help"], check=True, capture_output=True) |
| 497 | except subprocess.CalledProcessError: |
| 498 | raise RuntimeError( |
| 499 | "Plugin directory contains an uncompiled project, " |
| 500 | "but xcodebuild requires XCode to compile plugins." |
| 501 | ) |
| 502 | for xcodeproj in xcodeproj_dirs: |
| 503 | build_cmd = [ |
| 504 | xcodebuild, |
| 505 | "-project", |
| 506 | str(xcodeproj), |
| 507 | f"CONFIGURATION_BUILD_DIR={PLUGINS_DIR}", |
| 508 | # do not create dSYM debug symbols directory |
| 509 | "DEBUG_INFORMATION_FORMAT=", |
| 510 | ] |
| 511 | explained_check_call(build_cmd) |
| 512 | |
| 513 | if not pages: |
| 514 | return |
no test coverage detected