From 51b8b61365524e1702838db799a20ca2197e51c0 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Tue, 6 Apr 2021 11:46:38 +0200 Subject: [PATCH] rebrand to OpenPype --- pyproject.toml | 14 +++++++------- tools/fetch_thirdparty_libs.ps1 | 8 ++++---- tools/fetch_thirdparty_libs.py | 18 +++++++----------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 589342da05..bc808b5b9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,28 +77,28 @@ url = "https://distribute.openpype.io/wheels/" requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" -[pype] +[openpype] -[pype.thirdparty.ffmpeg.windows] +[openpype.thirdparty.ffmpeg.windows] url = "https://distribute.openpype.io/thirdparty/ffmpeg-4.13-windows.zip" hash = "43988ebcba98313635f06f2ca7e2dd52670710ebceefaa77107321b1def30472" -[pype.thirdparty.ffmpeg.linux] +[openpype.thirdparty.ffmpeg.linux] url = "https://distribute.openpype.io/thirdparty/ffmpeg-20200504-linux.tgz" hash = "sha256:..." -[pype.thirdparty.ffmpeg.darwin] +[openpype.thirdparty.ffmpeg.darwin] url = "https://distribute.openpype.io/thirdparty/ffmpeg-20200504-darwin.tgz" hash = "sha256:..." -[pype.thirdparty.oiio.windows] +[openpype.thirdparty.oiio.windows] url = "https://distribute.openpype.io/thirdparty/oiio_tools-2.2.0-windows.zip" hash = "fd2e00278e01e85dcee7b4a6969d1a16f13016ec16700fb0366dbb1b1f3c37ad" -[pype.thirdparty.oiio.linux] +[openpype.thirdparty.oiio.linux] url = "https://distribute.openpype.io/thirdparty/oiio-2.2.0-linux.tgz" hash = "sha256:..." -[pype.thirdparty.oiio.darwin] +[openpype.thirdparty.oiio.darwin] url = "https://distribute.openpype.io/thirdparty/oiio-2.2.0-darwin.tgz" hash = "sha256:..." \ No newline at end of file diff --git a/tools/fetch_thirdparty_libs.ps1 b/tools/fetch_thirdparty_libs.ps1 index 7eed5a22db..f79cfdd267 100644 --- a/tools/fetch_thirdparty_libs.ps1 +++ b/tools/fetch_thirdparty_libs.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Download and extract third-party dependencies for Pype. + Download and extract third-party dependencies for OpenPype. .DESCRIPTION This will download third-party dependencies specified in pyproject.toml @@ -14,8 +14,8 @@ PS> .\fetch_thirdparty_libs.ps1 #> $current_dir = Get-Location $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent -$pype_root = (Get-Item $script_dir).parent.FullName -Set-Location -Path $pype_root +$openpype_root = (Get-Item $script_dir).parent.FullName +Set-Location -Path $openpype_root -& poetry run python "$($pype_root)\tools\fetch_thirdparty_libs.py" +& poetry run python "$($openpype_root)\tools\fetch_thirdparty_libs.py" Set-Location -Path $current_dir diff --git a/tools/fetch_thirdparty_libs.py b/tools/fetch_thirdparty_libs.py index 5d38d69767..75ee052950 100644 --- a/tools/fetch_thirdparty_libs.py +++ b/tools/fetch_thirdparty_libs.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -"""Fetch, verify and process third-party dependencies of Pype. +"""Fetch, verify and process third-party dependencies of OpenPype. -Those should be defined in `pyproject.toml` in Pype sources root. +Those should be defined in `pyproject.toml` in OpenPype sources root. """ import os @@ -68,19 +68,19 @@ def _print(msg: str, message_type: int = 0) -> None: _print("Processing third-party dependencies ...") start_time = time.time_ns() -pype_root = Path(os.path.dirname(__file__)).parent -pyproject = toml.load(pype_root / "pyproject.toml") +openpype_root = Path(os.path.dirname(__file__)).parent +pyproject = toml.load(openpype_root / "pyproject.toml") platform_name = platform.system().lower() try: - thirdparty = pyproject["pype"]["thirdparty"] + thirdparty = pyproject["openpype"]["thirdparty"] except AttributeError: _print("No third-party libraries specified in pyproject.toml", 1) sys.exit(1) for k, v in thirdparty.items(): _print(f"processing {k}") - destination_path = pype_root / "vendor" / "bin" / k / platform_name + destination_path = openpype_root / "vendor" / "bin" / k / platform_name url = v.get(platform_name).get("url") if not v.get(platform_name): @@ -150,11 +150,7 @@ for k, v in thirdparty.items(): try: tar_file = tarfile.open(temp_file, tar_type) except tarfile.ReadError: - raise SystemExit( - "corrupted archive: also consider to download the " - "archive manually, add its path to the url, run " - "`./pype deploy`" - ) + raise SystemExit("corrupted archive") tar_file.extractall(destination_path) tar_file.close() _print("Extraction OK", 3)