mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
replaced 'get_pype_version' with 'get_openpype_version'
This commit is contained in:
parent
eae9fe398d
commit
b71898e1d8
1 changed files with 12 additions and 3 deletions
|
|
@ -11,11 +11,20 @@ from .execute import get_pype_execute_args
|
|||
from .local_settings import get_local_site_id
|
||||
|
||||
|
||||
def get_pype_version():
|
||||
def get_openpype_version():
|
||||
"""Version of pype that is currently used."""
|
||||
return openpype.version.__version__
|
||||
|
||||
|
||||
def get_pype_version():
|
||||
"""Backwards compatibility. Remove when 100% not used."""
|
||||
print((
|
||||
"Using deprecated function 'openpype.lib.pype_info.get_pype_version'"
|
||||
" replace with 'openpype.lib.pype_info.get_openpype_version'."
|
||||
))
|
||||
return get_openpype_version()
|
||||
|
||||
|
||||
def get_pype_info():
|
||||
"""Information about currently used Pype process."""
|
||||
executable_args = get_pype_execute_args()
|
||||
|
|
@ -25,7 +34,7 @@ def get_pype_info():
|
|||
version_type = "code"
|
||||
|
||||
return {
|
||||
"version": get_pype_version(),
|
||||
"version": get_openpype_version(),
|
||||
"version_type": version_type,
|
||||
"executable": executable_args[-1],
|
||||
"pype_root": os.environ["OPENPYPE_REPOS_ROOT"],
|
||||
|
|
@ -73,7 +82,7 @@ def extract_pype_info_to_file(dirpath):
|
|||
filepath (str): Full path to file where data were extracted.
|
||||
"""
|
||||
filename = "{}_{}_{}.json".format(
|
||||
get_pype_version(),
|
||||
get_openpype_version(),
|
||||
get_local_site_id(),
|
||||
datetime.datetime.now().strftime("%y%m%d%H%M%S")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue