From e39fb4f69572168d81f2608c6a89002195822e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= Date: Thu, 26 Oct 2023 00:45:18 +0200 Subject: [PATCH] Mangle paths --- scripts/build-codecs.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/build-codecs.py b/scripts/build-codecs.py index 23b84b2..1952fc3 100644 --- a/scripts/build-codecs.py +++ b/scripts/build-codecs.py @@ -19,10 +19,19 @@ shutil.rmtree(d) +def mangle_path(path): + if platform.system() == "Windows": + return ( + path.replace(os.path.sep, "/").replace("C:", "/c").replace("D:", "/d") + ) + else: + return path + + def build(package, configure_args=[]): path = os.path.join(build_dir, package) os.chdir(path) - run(["sh", "./configure"] + configure_args + ["--prefix=" + dest_dir]) + run(["sh", "./configure"] + configure_args + ["--prefix=" + mangle_path(dest_dir)]) run(["make"]) run(["make", "install"]) os.chdir(build_dir)