diff --git a/blender_cloud/wheels/__init__.py b/blender_cloud/wheels/__init__.py index f5eb570..3a84a25 100644 --- a/blender_cloud/wheels/__init__.py +++ b/blender_cloud/wheels/__init__.py @@ -58,8 +58,12 @@ def wheel_filename(fname_prefix: str) -> str: if not wheels: raise RuntimeError("Unable to find wheel at %r" % path_pattern) - # If there are multiple wheels that match, load the latest one. - wheels.sort() + # If there are multiple wheels that match, load the last-modified one. + # Alphabetical sorting isn't going to cut it since BAT 1.10 was released. + def modtime(filename: str) -> int: + return os.stat(filename).st_mtime + + wheels.sort(key=modtime) return wheels[-1] @@ -68,3 +72,8 @@ def load_wheels(): load_wheel("lockfile", "lockfile") load_wheel("cachecontrol", "CacheControl") load_wheel("pillarsdk", "pillarsdk") + + +if __name__ == "__main__": + wheel = wheel_filename("blender_asset_tracer") + print(f"Wheel: {wheel}") diff --git a/requirements.txt b/requirements.txt index 6b74f49..f9a0639 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ lockfile==0.12.2 pillarsdk==1.8.0 wheel==0.29.0 -blender-asset-tracer==1.8 +blender-asset-tracer==1.10 # Secondary requirements: asn1crypto==0.24.0