mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
🐛 fix build directory on darwin
This commit is contained in:
parent
278c8e9298
commit
34dff12fb3
1 changed files with 10 additions and 3 deletions
|
|
@ -29,6 +29,7 @@ import shutil
|
||||||
import blessed
|
import blessed
|
||||||
import enlighten
|
import enlighten
|
||||||
import time
|
import time
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
term = blessed.Terminal()
|
term = blessed.Terminal()
|
||||||
|
|
@ -52,7 +53,7 @@ def _print(msg: str, type: int = 0) -> None:
|
||||||
else:
|
else:
|
||||||
header = term.darkolivegreen3("--- ")
|
header = term.darkolivegreen3("--- ")
|
||||||
|
|
||||||
print("{}{}".format(header, msg))
|
print(f"{header}{msg}")
|
||||||
|
|
||||||
|
|
||||||
def count_folders(path: Path) -> int:
|
def count_folders(path: Path) -> int:
|
||||||
|
|
@ -95,16 +96,22 @@ assert site_pkg, "No venv site-packages are found."
|
||||||
_print(f"Working with: {site_pkg}", 2)
|
_print(f"Working with: {site_pkg}", 2)
|
||||||
|
|
||||||
openpype_root = Path(os.path.dirname(__file__)).parent
|
openpype_root = Path(os.path.dirname(__file__)).parent
|
||||||
|
version = {}
|
||||||
|
with open(openpype_root / "openpype" / "version.py") as fp:
|
||||||
|
exec(fp.read(), version)
|
||||||
|
|
||||||
|
version_match = re.search(r"(\d+\.\d+.\d+).*", version["__version__"])
|
||||||
|
openpype_version = version_match[1]
|
||||||
|
|
||||||
# create full path
|
# create full path
|
||||||
if platform.system().lower() == "darwin":
|
if platform.system().lower() == "darwin":
|
||||||
build_dir = openpype_root.joinpath(
|
build_dir = openpype_root.joinpath(
|
||||||
"build",
|
"build",
|
||||||
"OpenPype.app",
|
f"OpenPype {openpype_version}.app",
|
||||||
"Contents",
|
"Contents",
|
||||||
"MacOS")
|
"MacOS")
|
||||||
else:
|
else:
|
||||||
build_subdir = "exe.{}-{}".format(get_platform(), sys.version[0:3])
|
build_subdir = f"exe.{get_platform()}-{sys.version[:3]}"
|
||||||
build_dir = openpype_root / "build" / build_subdir
|
build_dir = openpype_root / "build" / build_subdir
|
||||||
|
|
||||||
_print(f"Using build at {build_dir}", 2)
|
_print(f"Using build at {build_dir}", 2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue