mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Install pywin requirement with prehook
This commit is contained in:
parent
e75167445f
commit
4be7c102cf
1 changed files with 23 additions and 0 deletions
23
pype/hooks/photoshop/prelaunch.py
Normal file
23
pype/hooks/photoshop/prelaunch.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import pype.lib
|
||||
from pype.api import Logger
|
||||
|
||||
|
||||
class PhotoshopPrelaunch(pype.lib.PypeHook):
|
||||
"""This hook will check for the existence of PyWin
|
||||
|
||||
PyWin is a requirement for the Photoshop integration.
|
||||
"""
|
||||
project_code = None
|
||||
|
||||
def __init__(self, logger=None):
|
||||
if not logger:
|
||||
self.log = Logger().get_logger(self.__class__.__name__)
|
||||
else:
|
||||
self.log = logger
|
||||
|
||||
self.signature = "( {} )".format(self.__class__.__name__)
|
||||
|
||||
def execute(self, *args, env: dict = None) -> bool:
|
||||
output = pype.lib._subprocess(["pip", "install", "pywin32==227"])
|
||||
self.log.info(output)
|
||||
return True
|
||||
Loading…
Add table
Add a link
Reference in a new issue