mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #1380 from pypeclub/bugfix/1326_MacOs-issues
Thanks guys. noted
This commit is contained in:
commit
95aabe92bd
12 changed files with 60 additions and 14 deletions
|
|
@ -285,7 +285,7 @@ class BootstrapRepos:
|
|||
"""Get version of local OpenPype."""
|
||||
|
||||
version = {}
|
||||
path = Path(os.path.dirname(__file__)).parent / "openpype" / "version.py"
|
||||
path = Path(os.environ["OPENPYPE_ROOT"]) / "openpype" / "version.py"
|
||||
with open(path, "r") as fp:
|
||||
exec(fp.read(), version)
|
||||
return version["__version__"]
|
||||
|
|
|
|||
BIN
igniter/openpype.icns
Normal file
BIN
igniter/openpype.icns
Normal file
Binary file not shown.
|
|
@ -130,7 +130,7 @@ def validate_mongo_connection(cnx: str) -> (bool, str):
|
|||
mongo_args["port"] = int(port)
|
||||
|
||||
try:
|
||||
client = MongoClient(**mongo_args)
|
||||
client = MongoClient(cnx)
|
||||
client.server_info()
|
||||
client.close()
|
||||
except ServerSelectionTimeoutError as e:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[tool.poetry]
|
||||
name = "OpenPype"
|
||||
version = "3.0.0-beta2"
|
||||
description = "Multi-platform open-source pipeline built around the Avalon platform, expanding it with extra features and integrations."
|
||||
description = "Open VFX and Animation pipeline with support."
|
||||
authors = ["OpenPype Team <info@openpype.io>"]
|
||||
license = "MIT License"
|
||||
homepage = "https://openpype.io"
|
||||
|
|
|
|||
23
setup.py
23
setup.py
|
|
@ -45,7 +45,8 @@ install_requires = [
|
|||
"googleapiclient",
|
||||
"httplib2",
|
||||
# Harmony implementation
|
||||
"filecmp"
|
||||
"filecmp",
|
||||
"dns"
|
||||
]
|
||||
|
||||
includes = []
|
||||
|
|
@ -69,7 +70,11 @@ if sys.platform == "win32":
|
|||
"pythoncom"
|
||||
])
|
||||
|
||||
build_options = dict(
|
||||
|
||||
icon_path = openpype_root / "igniter" / "openpype.ico"
|
||||
mac_icon_path = openpype_root / "igniter" / "openpype.icns"
|
||||
|
||||
build_exe_options = dict(
|
||||
packages=install_requires,
|
||||
includes=includes,
|
||||
excludes=excludes,
|
||||
|
|
@ -78,13 +83,16 @@ build_options = dict(
|
|||
optimize=0
|
||||
)
|
||||
|
||||
icon_path = openpype_root / "igniter" / "openpype.ico"
|
||||
bdist_mac_options = dict(
|
||||
bundle_name="OpenPype",
|
||||
iconfile=mac_icon_path
|
||||
)
|
||||
|
||||
executables = [
|
||||
Executable("start.py", base=None,
|
||||
target_name="openpype_console", icon=icon_path.as_posix()),
|
||||
Executable("start.py", base=base,
|
||||
target_name="openpype_gui", icon=icon_path.as_posix())
|
||||
target_name="openpype_gui", icon=icon_path.as_posix()),
|
||||
Executable("start.py", base=None,
|
||||
target_name="openpype_console", icon=icon_path.as_posix())
|
||||
]
|
||||
|
||||
setup(
|
||||
|
|
@ -93,7 +101,8 @@ setup(
|
|||
description="Ultimate pipeline",
|
||||
cmdclass={"build_sphinx": BuildDoc},
|
||||
options={
|
||||
"build_exe": build_options,
|
||||
"build_exe": build_exe_options,
|
||||
"bdist_mac": bdist_mac_options,
|
||||
"build_sphinx": {
|
||||
"project": "OpenPype",
|
||||
"version": __version__,
|
||||
|
|
|
|||
1
start.py
1
start.py
|
|
@ -115,6 +115,7 @@ else:
|
|||
os.path.join(OPENPYPE_ROOT, "dependencies")
|
||||
)
|
||||
sys.path.append(frozen_libs)
|
||||
sys.path.insert(0, OPENPYPE_ROOT)
|
||||
# add stuff from `<frozen>/dependencies` to PYTHONPATH.
|
||||
pythonpath = os.getenv("PYTHONPATH", "")
|
||||
paths = pythonpath.split(os.pathsep)
|
||||
|
|
|
|||
|
|
@ -121,6 +121,10 @@ catch {
|
|||
Exit-WithCode 1
|
||||
}
|
||||
|
||||
Write-Host ">>> " -NoNewLine -ForegroundColor green
|
||||
Write-Host "Making sure submodules are up-to-date ..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
Write-Host ">>> " -NoNewline -ForegroundColor green
|
||||
Write-Host "Building OpenPype [ " -NoNewline -ForegroundColor white
|
||||
Write-host $openpype_version -NoNewline -ForegroundColor green
|
||||
|
|
|
|||
|
|
@ -157,10 +157,33 @@ main () {
|
|||
install_poetry || { echo -e "${BIRed}!!!${RST} Poetry installation failed"; return; }
|
||||
fi
|
||||
|
||||
echo -e "${BIGreen}>>>${RST} Making sure submodules are up-to-date ..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
echo -e "${BIGreen}>>>${RST} Building ..."
|
||||
poetry run python3 "$openpype_root/setup.py" build > "$openpype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
poetry run python3 "$openpype_root/setup.py" build > "$openpype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
poetry run python3 "$openpype_root/setup.py" bdist_mac > "$openpype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }
|
||||
fi
|
||||
poetry run python3 "$openpype_root/tools/build_dependencies.py"
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# fix code signing issue
|
||||
codesign --remove-signature "$openpype_root/build/OpenPype.app/Contents/MacOS/lib/Python"
|
||||
if command -v create-dmg > /dev/null 2>&1; then
|
||||
create-dmg \
|
||||
--volname "OpenPype Installer" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 600 300 \
|
||||
--app-drop-link 100 50 \
|
||||
"$openpype_root/build/OpenPype-Installer.dmg" \
|
||||
"$openpype_root/build/OpenPype.app"
|
||||
else
|
||||
echo -e "${BIYellow}!!!${RST} ${BIWhite}create-dmg${RST} command is not available."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${BICyan}>>>${RST} All done. You will find OpenPype and build log in \c"
|
||||
echo -e "${BIWhite}$openpype_root/build${RST} directory."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import os
|
|||
import sys
|
||||
import site
|
||||
from distutils.util import get_platform
|
||||
import platform
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import blessed
|
||||
|
|
@ -76,7 +77,14 @@ _print(f"Working with: {site_pkg}", 2)
|
|||
build_dir = "exe.{}-{}".format(get_platform(), sys.version[0:3])
|
||||
|
||||
# create full path
|
||||
build_dir = Path(os.path.dirname(__file__)).parent / "build" / build_dir
|
||||
if platform.system().lower() == "darwin":
|
||||
build_dir = Path(os.path.dirname(__file__)).parent.joinpath(
|
||||
"build",
|
||||
"OpenPype.app",
|
||||
"Contents",
|
||||
"MacOS")
|
||||
else:
|
||||
build_dir = Path(os.path.dirname(__file__)).parent / "build" / build_dir
|
||||
|
||||
_print(f"Using build at {build_dir}", 2)
|
||||
if not build_dir.exists():
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ if (-not (Test-Path -PathType Leaf -Path "$($openpype_root)\poetry.lock")) {
|
|||
Write-Host ">>> " -NoNewline -ForegroundColor green
|
||||
Write-Host "Installing virtual environment from lock."
|
||||
}
|
||||
& poetry install $poetry_verbosity
|
||||
& poetry install --no-root $poetry_verbosity
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "!!! " -ForegroundColor yellow -NoNewline
|
||||
Write-Host "Poetry command failed."
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ main () {
|
|||
echo -e "${BIGreen}>>>${RST} Installing dependencies ..."
|
||||
fi
|
||||
|
||||
poetry install $poetry_verbosity || { echo -e "${BIRed}!!!${RST} Poetry environment installation failed"; return; }
|
||||
poetry install --no-root $poetry_verbosity || { echo -e "${BIRed}!!!${RST} Poetry environment installation failed"; return; }
|
||||
|
||||
echo -e "${BIGreen}>>>${RST} Cleaning cache files ..."
|
||||
clean_pyc
|
||||
|
|
|
|||
|
|
@ -82,3 +82,4 @@ main () {
|
|||
echo -e "${BIGreen}>>>${RST} Detached to background."
|
||||
}
|
||||
|
||||
main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue