mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #1137 from pypeclub/bugfix/remove_tvpaint_pywin_installer
Remove TVPaint's pywin installer
This commit is contained in:
commit
fc1a93f4ab
1 changed files with 0 additions and 35 deletions
|
|
@ -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)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue