mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fixes for build, acre in pypeclub fork
This commit is contained in:
parent
924ae33a51
commit
84c8e9e8b1
7 changed files with 18 additions and 44 deletions
|
|
@ -149,10 +149,10 @@ class InstallDialog(QtWidgets.QDialog):
|
|||
self.setLayout(mongo_layout)
|
||||
|
||||
def _mongo_changed(self, mongo: str):
|
||||
self.parent()._mongo_url = mongo
|
||||
self.parent().mongo_url = mongo
|
||||
|
||||
def get_mongo_url(self):
|
||||
return self.parent()._mongo_url
|
||||
return self.parent().mongo_url
|
||||
|
||||
def set_valid(self):
|
||||
self._mongo_input.setStyleSheet(
|
||||
|
|
@ -303,7 +303,7 @@ class InstallDialog(QtWidgets.QDialog):
|
|||
options |= QtWidgets.QFileDialog.DontUseNativeDialog
|
||||
options |= QtWidgets.QFileDialog.ShowDirsOnly
|
||||
|
||||
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||
filename, _ = QtWidgets.QFileDialog.getExistingDirectory(
|
||||
parent=self,
|
||||
caption='Select path',
|
||||
directory=os.getcwd(),
|
||||
|
|
@ -378,6 +378,7 @@ class InstallDialog(QtWidgets.QDialog):
|
|||
|
||||
if len(self._path) < 1:
|
||||
self._mongo.setVisible(False)
|
||||
return path
|
||||
|
||||
def _update_console(self, msg: str, error: bool = False) -> None:
|
||||
"""Display message in console.
|
||||
|
|
|
|||
|
|
@ -146,10 +146,11 @@ class InstallThread(QThread):
|
|||
bs.registry.set_secure_item("pypeMongo", self._mongo)
|
||||
os.environ["PYPE_MONGO"] = self._mongo
|
||||
|
||||
self.message.emit(f"processing {self._path}", True)
|
||||
repo_file = bs.process_entered_location(self._path)
|
||||
|
||||
if not repo_file:
|
||||
self.message.emit(f"!!! Cannot install", True)
|
||||
self.message.emit("!!! Cannot install", True)
|
||||
return
|
||||
|
||||
def set_path(self, path: str) -> None:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Tools used in **Igniter** GUI."""
|
||||
import os
|
||||
import sys
|
||||
import uuid
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
|
@ -81,26 +80,6 @@ def validate_path_string(path: str) -> (bool, str):
|
|||
return False, "Not implemented yet"
|
||||
|
||||
|
||||
def add_acre_to_sys_path():
|
||||
"""Add full path of acre module to sys.path on ignition."""
|
||||
try:
|
||||
# Skip if is possible to import
|
||||
import acre
|
||||
|
||||
except ImportError:
|
||||
# Full path to acre repository related to current file
|
||||
acre_dir = os.path.join(
|
||||
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
|
||||
"repos",
|
||||
"acre"
|
||||
)
|
||||
# Add path to sys.path
|
||||
sys.path.append(acre_dir)
|
||||
|
||||
# Validate that acre can be imported
|
||||
import acre
|
||||
|
||||
|
||||
def load_environments(sections: list = None) -> dict:
|
||||
"""Load environments from Pype.
|
||||
|
||||
|
|
@ -114,7 +93,6 @@ def load_environments(sections: list = None) -> dict:
|
|||
dict of str: loaded and processed environments.
|
||||
|
||||
"""
|
||||
add_acre_to_sys_path()
|
||||
import acre
|
||||
|
||||
from pype import settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue