Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3622 from pypeclub/bugfix/macos-build-with-version
Browse files Browse the repository at this point in the history
Fix for multi-version build on Mac
  • Loading branch information
antirotor authored Aug 5, 2022
2 parents 278c8e9 + 34dff12 commit e4d78e1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tools/build_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import blessed
import enlighten
import time
import re


term = blessed.Terminal()
Expand All @@ -52,7 +53,7 @@ def _print(msg: str, type: int = 0) -> None:
else:
header = term.darkolivegreen3("--- ")

print("{}{}".format(header, msg))
print(f"{header}{msg}")


def count_folders(path: Path) -> int:
Expand Down Expand Up @@ -95,16 +96,22 @@ def count_folders(path: Path) -> int:
_print(f"Working with: {site_pkg}", 2)

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
if platform.system().lower() == "darwin":
build_dir = openpype_root.joinpath(
"build",
"OpenPype.app",
f"OpenPype {openpype_version}.app",
"Contents",
"MacOS")
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

_print(f"Using build at {build_dir}", 2)
Expand Down

0 comments on commit e4d78e1

Please sign in to comment.