mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
75 lines
1.8 KiB
Python
75 lines
1.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""Implementation of Pype commands."""
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
from pype.lib import PypeLogger as Logger
|
|
from pype.lib import execute
|
|
|
|
|
|
class PypeCommands:
|
|
"""Class implementing commands used by Pype.
|
|
|
|
Most of its methods are called by :mod:`cli` module.
|
|
"""
|
|
@staticmethod
|
|
def launch_tray(debug):
|
|
if debug:
|
|
execute([
|
|
sys.executable,
|
|
"-m",
|
|
"pype.tools.tray"
|
|
])
|
|
return
|
|
|
|
detached_process = 0x00000008 # noqa: N806
|
|
|
|
args = [sys.executable, "-m", "pype.tools.tray"]
|
|
if sys.platform.startswith('linux'):
|
|
subprocess.Popen(
|
|
args,
|
|
universal_newlines=True,
|
|
bufsize=1,
|
|
env=os.environ,
|
|
stdout=None,
|
|
stderr=None,
|
|
preexec_fn=os.setpgrp
|
|
)
|
|
|
|
if sys.platform == 'win32':
|
|
args = ["pythonw", "-m", "pype.tools.tray"]
|
|
subprocess.Popen(
|
|
args,
|
|
universal_newlines=True,
|
|
bufsize=1,
|
|
cwd=None,
|
|
env=os.environ,
|
|
stdout=open(Logger.get_file_path(), 'w+'),
|
|
stderr=subprocess.STDOUT,
|
|
creationflags=detached_process
|
|
)
|
|
|
|
def launch_eventservercli(self, args):
|
|
pass
|
|
|
|
def publish(self, gui, paths):
|
|
pass
|
|
|
|
def texture_copy(self, project, asset, path):
|
|
pass
|
|
|
|
def run_pype_tests(self, keyword, id):
|
|
pass
|
|
|
|
def make_docs(self):
|
|
pass
|
|
|
|
def pype_setup_coverage(self):
|
|
pass
|
|
|
|
def run_application(self, app, project, asset, task, tools, arguments):
|
|
pass
|
|
|
|
def validate_jsons(self):
|
|
pass
|