From 2fbe1d80e45c13a9846c971805121effe699a089 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 16 Mar 2021 10:59:02 +0100 Subject: [PATCH] removed tvpaint's prelaunch hook that install pywin32 module with pip --- pype/hosts/tvpaint/hooks/pre_install_pywin.py | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 pype/hosts/tvpaint/hooks/pre_install_pywin.py diff --git a/pype/hosts/tvpaint/hooks/pre_install_pywin.py b/pype/hosts/tvpaint/hooks/pre_install_pywin.py deleted file mode 100644 index 7abab33757..0000000000 --- a/pype/hosts/tvpaint/hooks/pre_install_pywin.py +++ /dev/null @@ -1,35 +0,0 @@ -from pype.lib import ( - PreLaunchHook, - ApplicationLaunchFailed, - run_subprocess -) - - -class PreInstallPyWin(PreLaunchHook): - """Hook makes sure there is installed python module pywin32 on windows.""" - # WARNING This hook will probably be deprecated in Pype 3 - kept for test - order = 10 - app_groups = ["tvpaint"] - platforms = ["windows"] - - def execute(self): - installed = False - try: - from win32com.shell import shell - self.log.debug("Python module `pywin32` already installed.") - installed = True - except Exception: - pass - - if installed: - return - - try: - output = run_subprocess( - ["pip", "install", "pywin32==227"] - ) - self.log.debug("Pip install pywin32 output:\n{}'".format(output)) - except RuntimeError: - msg = "Installation of python module `pywin32` crashed." - self.log.warning(msg, exc_info=True) - raise ApplicationLaunchFailed(msg)