Merge pull request #122 from ryuan/bug-121-mac-install

closes #121 regarding dependency installations on M1/M2 Macs
main
s9roll7 2023-10-10 14:50:30 +09:00 committed by GitHub
commit a221237640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import launch
import platform
def update_transparent_background():
from importlib.metadata import version as meta_version
@ -8,6 +9,12 @@ def update_transparent_background():
if version.parse(v) < version.parse('1.2.3'):
launch.run_pip("install -U transparent-background", "update transparent-background version for Ebsynth Utility")
# Check if user is running an M1/M2 device and, if so, install pyvirtualcam, which is required for updating the transparent_background package
# Note that we have to directly install from source because the prebuilt PyPl wheel does not support ARM64 machines such as M1/M2 Macs
if platform.system() == "Darwin" and platform.machine() == "arm64":
if not launch.is_installed("pyvirtualcam"):
launch.run_pip("install git+https://github.com/letmaik/pyvirtualcam", "requirements for Ebsynth Utility")
if not launch.is_installed("transparent_background"):
launch.run_pip("install transparent-background", "requirements for Ebsynth Utility")