(dependency_name: str, configure_args: "list[str]", cwd: str)
| 536 | |
| 537 | |
| 538 | def run_autoconf(dependency_name: str, configure_args: "list[str]", cwd: str) -> None: |
| 539 | configure_path = os.path.realpath(os.path.join(cwd, "..", "configure")) |
| 540 | if not os.path.exists(configure_path): |
| 541 | run( |
| 542 | [bash, "./autogen.sh"], cwd=os.path.realpath(os.path.join(cwd, "..")) |
| 543 | ) # only run autogen.sh in the directory it is located and use cwd to achieve that in order to not mess up things |
| 544 | # Using `sh` over `bash` fixes issues with building swig |
| 545 | prefix = os.path.realpath(f"{DEPS_DIR}/install/{dependency_name}") |
| 546 | |
| 547 | wasm = [] |
| 548 | if "wasm" in flags: |
| 549 | wasm.append("emconfigure") |
| 550 | |
| 551 | run( |
| 552 | [ |
| 553 | *wasm, |
| 554 | "/bin/sh", |
| 555 | "../configure", |
| 556 | *(["--host=wasm32"] if "wasm" in flags and not any(s.startswith("--host") for s in configure_args) else []), |
| 557 | *configure_args, |
| 558 | f"--prefix={prefix}", |
| 559 | ], |
| 560 | cwd=cwd, |
| 561 | ) |
| 562 | |
| 563 | |
| 564 | def run_cmake(arg1, cmake_args: "list[str]", cmake_dir: Union[str, None] = None, cwd: Union[str, None] = None): |
no test coverage detected