mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
pype info will also show build version
This commit is contained in:
parent
8674523681
commit
239ab2cbaa
2 changed files with 16 additions and 7 deletions
|
|
@ -10,11 +10,12 @@ from .execute import get_openpype_execute_args
|
|||
from .local_settings import get_local_site_id
|
||||
from .openpype_version import (
|
||||
is_running_from_build,
|
||||
get_openpype_version
|
||||
get_openpype_version,
|
||||
get_build_version
|
||||
)
|
||||
|
||||
|
||||
def get_pype_info():
|
||||
def get_openpype_info():
|
||||
"""Information about currently used Pype process."""
|
||||
executable_args = get_openpype_execute_args()
|
||||
if is_running_from_build():
|
||||
|
|
@ -23,6 +24,7 @@ def get_pype_info():
|
|||
version_type = "code"
|
||||
|
||||
return {
|
||||
"build_verison": get_build_version(),
|
||||
"version": get_openpype_version(),
|
||||
"version_type": version_type,
|
||||
"executable": executable_args[-1],
|
||||
|
|
@ -51,7 +53,7 @@ def get_workstation_info():
|
|||
def get_all_current_info():
|
||||
"""All information about current process in one dictionary."""
|
||||
return {
|
||||
"pype": get_pype_info(),
|
||||
"pype": get_openpype_info(),
|
||||
"workstation": get_workstation_info(),
|
||||
"env": os.environ.copy(),
|
||||
"local_settings": get_local_settings()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from openpype.api import resources
|
|||
from openpype.settings.lib import get_local_settings
|
||||
from openpype.lib.pype_info import (
|
||||
get_all_current_info,
|
||||
get_pype_info,
|
||||
get_openpype_info,
|
||||
get_workstation_info,
|
||||
extract_pype_info_to_file
|
||||
)
|
||||
|
|
@ -426,7 +426,7 @@ class PypeInfoSubWidget(QtWidgets.QWidget):
|
|||
"""Create widget with information about OpenPype application."""
|
||||
|
||||
# Get pype info data
|
||||
pype_info = get_pype_info()
|
||||
pype_info = get_openpype_info()
|
||||
# Modify version key/values
|
||||
version_value = "{} ({})".format(
|
||||
pype_info.pop("version", self.not_applicable),
|
||||
|
|
@ -435,13 +435,20 @@ class PypeInfoSubWidget(QtWidgets.QWidget):
|
|||
pype_info["version_value"] = version_value
|
||||
# Prepare lable mapping
|
||||
key_label_mapping = {
|
||||
"version_value": "OpenPype version:",
|
||||
"version_value": "Running version:",
|
||||
"build_verison": "Build version:",
|
||||
"executable": "OpenPype executable:",
|
||||
"pype_root": "OpenPype location:",
|
||||
"mongo_url": "OpenPype Mongo URL:"
|
||||
}
|
||||
# Prepare keys order
|
||||
keys_order = ["version_value", "executable", "pype_root", "mongo_url"]
|
||||
keys_order = [
|
||||
"version_value",
|
||||
"build_verison",
|
||||
"executable",
|
||||
"pype_root",
|
||||
"mongo_url"
|
||||
]
|
||||
for key in pype_info.keys():
|
||||
if key not in keys_order:
|
||||
keys_order.append(key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue