mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
remove duplicate versions, print path
This commit is contained in:
parent
fe701ab0bd
commit
556975854b
2 changed files with 15 additions and 8 deletions
|
|
@ -203,6 +203,12 @@ class OpenPypeVersion(semver.VersionInfo):
|
|||
openpype_version.staging = True
|
||||
return openpype_version
|
||||
|
||||
def __hash__(self):
|
||||
if self.path:
|
||||
return hash(self.path)
|
||||
else:
|
||||
return hash(str(self))
|
||||
|
||||
|
||||
class BootstrapRepos:
|
||||
"""Class for bootstrapping local OpenPype installation.
|
||||
|
|
@ -650,6 +656,9 @@ class BootstrapRepos:
|
|||
v for v in openpype_versions if v.path.suffix != ".zip"
|
||||
]
|
||||
|
||||
# remove duplicates
|
||||
openpype_versions = list(set(openpype_versions))
|
||||
|
||||
return openpype_versions
|
||||
|
||||
def process_entered_location(self, location: str) -> Union[Path, None]:
|
||||
|
|
|
|||
14
start.py
14
start.py
|
|
@ -496,10 +496,9 @@ def _find_frozen_openpype(use_version: str = None,
|
|||
if openpype_versions:
|
||||
print(" - found: ")
|
||||
for v in openpype_versions:
|
||||
print(f" - {v}")
|
||||
print(f" - {local_version}")
|
||||
else:
|
||||
print(f" - local version {local_version}")
|
||||
print(f" - {v}: {v.path}")
|
||||
|
||||
print(f" - local version {local_version}")
|
||||
sys.exit(1)
|
||||
|
||||
# test if latest detected is installed (in user data dir)
|
||||
|
|
@ -577,10 +576,9 @@ def _bootstrap_from_code(use_version):
|
|||
if openpype_versions:
|
||||
print(" - found: ")
|
||||
for v in openpype_versions:
|
||||
print(f" - {v}")
|
||||
print(f" - {local_version}")
|
||||
else:
|
||||
print(f" - local version {local_version}")
|
||||
print(f" - {v}: {v.path}")
|
||||
|
||||
print(f" - local version {local_version}")
|
||||
sys.exit(1)
|
||||
else:
|
||||
os.environ["OPENPYPE_VERSION"] = local_version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue