Skip to content

Commit

Permalink
download mediainfo lib
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Jan 27, 2024
1 parent 6a8a817 commit 9817c6c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packaging/universal2_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
cwd = pathlib.Path()
requirements_path = cwd / "requirements.txt"
tmp_dir = cwd / "temp"
new_requirements = []
for requirement_str in requirements_path.read_text().splitlines():
try:
requirement = Requirement(requirement_str)
Expand Down Expand Up @@ -82,5 +81,19 @@
str(tmp_dir),
]
)
if requirement.name == "pymediainfo":
subprocess.call(
[
"curl",
"-L",
"https://mediaarea.net/download/binary/libmediainfo0/23.11/MediaInfo_DLL_23.11_Mac_x86_64+arm64.tar.bz2",
"--output",
"libmediainfo.tar.bz2",
]
)
shutil.unpack_archive("libmediainfo.tar.bz2", "libmediainfo", "bztar")
shutil.move(
"libmediainfo/MediaInfoLib/libmediainfo.0.dylib", tmp_dir / "pymediainfo"
)
shutil.copytree(tmp_dir, sys_site_packages_path, dirs_exist_ok=True)
shutil.rmtree(tmp_dir)

0 comments on commit 9817c6c

Please sign in to comment.