MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / run_autoconf

Function run_autoconf

nix/build-all.py:538–561  ·  view source on GitHub ↗
(dependency_name: str, configure_args: "list[str]", cwd: str)

Source from the content-addressed store, hash-verified

536
537
538def 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
564def run_cmake(arg1, cmake_args: "list[str]", cmake_dir: Union[str, None] = None, cwd: Union[str, None] = None):

Callers 1

build_dependencyFunction · 0.85

Calls 3

runFunction · 0.70
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected