From dca9ffbd9d3f453deb4a5a67428f381eda3f8833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Fri, 24 May 2024 17:02:40 +0200 Subject: [PATCH] :art: add linux variant, little fixes --- client/ayon_usd/utils.py | 6 +++++- create_package.py | 5 +++++ pyproject.toml | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/ayon_usd/utils.py b/client/ayon_usd/utils.py index ad60133..d3f9aa7 100644 --- a/client/ayon_usd/utils.py +++ b/client/ayon_usd/utils.py @@ -8,6 +8,7 @@ import subprocess import zipfile from pathlib import Path +from typing import Union import ayon_api from ayon_core.lib.local_settings import get_ayon_appdirs @@ -170,12 +171,15 @@ def _find_file_info(name, files_info): ) -def get_downloaded_usd_root() -> str: +def get_downloaded_usd_root() -> Union[str, None]: """Get downloaded USD binary root path.""" if _USDOptions.downloaded_root is not NOT_SET: return _USDOptions.downloaded_root server_usd_info = _find_file_info("usd", get_server_files_info()) + if not server_usd_info: + return None + root = None for existing_info in get_downloaded_usd_info(): if existing_info["checksum"] != server_usd_info["checksum"]: diff --git a/create_package.py b/create_package.py index 8d5a791..6247f7b 100644 --- a/create_package.py +++ b/create_package.py @@ -61,6 +61,11 @@ "url": f"{AYON_SOURCE_URL}/usd-24.03_win64_py39.zip", "checksum": "7d7852b9c8e3501e5f64175decc08d70e3bf1c083faaaf2c1a8aa8f9af43ab30", "checksum_algorithm": "sha256", + }, + "linux": { + "url": f"{AYON_SOURCE_URL}/usd-24.03_linux_py39.zip", + "checksum": "27010ad67d5acd25e3c95b1ace4ab30e047b5a9e48082db0545ae44ae7ec9b09", + "checksum_algorithm": "sha256", } } } diff --git a/pyproject.toml b/pyproject.toml index ca76aab..5df4d81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ repository = "https://github.com/ynput/ayon-usd-resolver" [tool.poetry.dependencies] python = "^3.9" +ayon-python-api = "^1.0.5" [tool.poetry.dev-dependencies] pytest = "^8.2.0" @@ -27,6 +28,7 @@ pre-commit = "^3.6.2" codespell = "^2.2.6" pydantic = "^2.7.1" pydocstyle = "*" +requests = "^2.26.0" semver = "^3.0.2" # needed for ayon-python-api to run tests clique = "^2.0.0" # needed for ayon-python-api to run tests