Upgrade to BAT 1.10

Upgrade to BAT to fix doubly-compressed blend files.

This also changes the way the wheel files are loaded, as the old
alphabetical ordering won't pick up on BAT 1.10. It now uses the
modification time of the wheel files to find the latest one.
This commit is contained in:
Sybren A. Stüvel 2022-02-04 10:57:45 +01:00
parent 6718e1646f
commit a136366804
2 changed files with 12 additions and 3 deletions

View File

@ -58,8 +58,12 @@ def wheel_filename(fname_prefix: str) -> str:
if not wheels: if not wheels:
raise RuntimeError("Unable to find wheel at %r" % path_pattern) raise RuntimeError("Unable to find wheel at %r" % path_pattern)
# If there are multiple wheels that match, load the latest one. # If there are multiple wheels that match, load the last-modified one.
wheels.sort() # 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] return wheels[-1]
@ -68,3 +72,8 @@ def load_wheels():
load_wheel("lockfile", "lockfile") load_wheel("lockfile", "lockfile")
load_wheel("cachecontrol", "CacheControl") load_wheel("cachecontrol", "CacheControl")
load_wheel("pillarsdk", "pillarsdk") load_wheel("pillarsdk", "pillarsdk")
if __name__ == "__main__":
wheel = wheel_filename("blender_asset_tracer")
print(f"Wheel: {wheel}")

View File

@ -3,7 +3,7 @@
lockfile==0.12.2 lockfile==0.12.2
pillarsdk==1.8.0 pillarsdk==1.8.0
wheel==0.29.0 wheel==0.29.0
blender-asset-tracer==1.8 blender-asset-tracer==1.10
# Secondary requirements: # Secondary requirements:
asn1crypto==0.24.0 asn1crypto==0.24.0