mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added function get_vendor_bin_path to get binary path
This commit is contained in:
parent
c4af254d65
commit
391a1e0244
1 changed files with 24 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import logging
|
||||
import json
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
from . import get_paths_from_environ
|
||||
|
|
@ -8,6 +9,29 @@ from . import get_paths_from_environ
|
|||
log = logging.getLogger("FFmpeg utils")
|
||||
|
||||
|
||||
def get_vendor_bin_path(bin_app):
|
||||
"""Path to OpenPype vendorized binaries.
|
||||
|
||||
Vendorized executables are expected in specific hierarchy inside build or
|
||||
in code source.
|
||||
|
||||
"{OPENPYPE_ROOT}/vendor/bin/{name of vendorized app}/{platform}"
|
||||
|
||||
Args:
|
||||
bin_app (str): Name of vendorized application.
|
||||
|
||||
Returns:
|
||||
str: Path to vendorized binaries folder.
|
||||
"""
|
||||
return os.path.join(
|
||||
os.environ["OPENPYPE_ROOT"],
|
||||
"vendor",
|
||||
"bin",
|
||||
bin_app,
|
||||
platform.system().lower()
|
||||
)
|
||||
|
||||
|
||||
def get_ffmpeg_tool_path(tool="ffmpeg"):
|
||||
"""Find path to ffmpeg tool in OPENPYPE_FFMPEG_PATH paths.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue