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

Commit

Permalink
General: Runtime dependencies (#5206)
Browse files Browse the repository at this point in the history
* moved opentimlineio to runtime dependencies

* fix darwin fetch thirdparty

* Fix print

Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com>

* fix comment in pyproject toml

---------

Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com>
  • Loading branch information
iLLiCiTiT and antirotor authored Jul 5, 2023
1 parent 311d4a7 commit 823261c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 63 deletions.
51 changes: 0 additions & 51 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ python = ">=3.9.1,<3.10"
aiohttp = "^3.7"
aiohttp_json_rpc = "*" # TVPaint server
acre = { git = "https://github.com/pypeclub/acre.git" }
opentimelineio = "^0.14"
appdirs = { git = "https://github.com/ActiveState/appdirs.git", branch = "master" }
blessed = "^1.17" # openpype terminal formatting
coolname = "*"
Expand Down Expand Up @@ -131,10 +130,11 @@ version = "6.4.3"
package = "PySide2"
version = "5.15.2"

# DCC packages supply their own opencolorio, lets not interfere with theirs
[openpype.opencolorio]
package = "opencolorio"
version = "2.2.1"
# Python dependencies that will be available only in runtime of
# OpenPype process - do not interfere with DCCs dependencies
[openpype.runtime-deps]
opencolorio = "2.2.1"
opentimelineio = "0.14.1"

# TODO: we will need to handle different linux flavours here and
# also different macos versions too.
Expand Down
15 changes: 8 additions & 7 deletions tools/fetch_thirdparty_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def install_qtbinding(pyproject, openpype_root, platform_name):
version = qtbinding_def.get("version")
_pip_install(openpype_root, package, version)

python_vendor_dir = openpype_root / "vendor" / "python"

# Remove libraries for QtSql which don't have available libraries
# by default and Postgre library would require to modify rpath of
# dependency
Expand All @@ -115,12 +117,11 @@ def install_qtbinding(pyproject, openpype_root, platform_name):
os.remove(str(filepath))


def install_opencolorio(pyproject, openpype_root):
_print("Installing PyOpenColorIO")
opencolorio_def = pyproject["openpype"]["opencolorio"]
package = opencolorio_def["package"]
version = opencolorio_def.get("version")
_pip_install(openpype_root, package, version)
def install_runtime_dependencies(pyproject, openpype_root):
_print("Installing Runtime Dependencies ...")
runtime_deps = pyproject["openpype"]["runtime-deps"]
for package, version in runtime_deps.items():
_pip_install(openpype_root, package, version)


def install_thirdparty(pyproject, openpype_root, platform_name):
Expand Down Expand Up @@ -232,7 +233,7 @@ def main():
pyproject = toml.load(openpype_root / "pyproject.toml")
platform_name = platform.system().lower()
install_qtbinding(pyproject, openpype_root, platform_name)
install_opencolorio(pyproject, openpype_root)
install_runtime_dependencies(pyproject, openpype_root)
install_thirdparty(pyproject, openpype_root, platform_name)
end_time = time.time_ns()
total_time = (end_time - start_time) / 1000000000
Expand Down

0 comments on commit 823261c

Please sign in to comment.