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 #6155 from ynput/chore/OP-7416_runtime-depedencies
Browse files Browse the repository at this point in the history
Chore: Runtime dependencies
  • Loading branch information
iLLiCiTiT authored Apr 3, 2024
2 parents a3d8c5f + 0f1c0f1 commit 2e3786b
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 956 deletions.
10 changes: 8 additions & 2 deletions openpype/modules/sync_server/providers/dropbox.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import os

import dropbox
from openpype.lib import Logger

log = Logger.get_logger("DropboxHandler")
try:
import dropbox
except (ImportError, SyntaxError):
# TODO raise error in OpenPype process and ignore in other cases
log.info("'dropbox' import failed, operations will fail.")

from .abstract_provider import AbstractProvider
from ..utils import EditableScopes
Expand Down
11 changes: 3 additions & 8 deletions openpype/modules/sync_server/providers/gdrive.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import print_function
import os.path
import os
import time
import sys
import six
import platform

from openpype.lib import Logger
Expand All @@ -18,11 +16,8 @@
from googleapiclient import errors
from googleapiclient.http import MediaFileUpload, MediaIoBaseDownload
except (ImportError, SyntaxError):
if six.PY3:
six.reraise(*sys.exc_info())

# handle imports from Python 2 hosts - in those only basic methods are used
log.warning("Import failed, imported from Python 2, operations will fail.")
# TODO raise error in OpenPype process and ignore in other cases
log.info("'googleapi' import failed, operations will fail.")

SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly',
'https://www.googleapis.com/auth/drive.file',
Expand Down
6 changes: 2 additions & 4 deletions openpype/modules/sync_server/providers/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
import pysftp
import paramiko
except (ImportError, SyntaxError):
pass

# handle imports from Python 2 hosts - in those only basic methods are used
log.warning("Import failed, imported from Python 2, operations will fail.")
# TODO raise error in OpenPype process and ignore in other cases
log.info("'sftp' import failed, operations will fail.")


class SFTPHandler(AbstractProvider):
Expand Down
Loading

0 comments on commit 2e3786b

Please sign in to comment.