Skip to content

Commit

Permalink
Mangle paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaine committed Oct 25, 2023
1 parent d21cfb0 commit e39fb4f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/build-codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e39fb4f

Please sign in to comment.