Repository: mondeja/blender-downloader (language: python)

Issue:
Support new arm64 Windows releases
Blender 4.3 includes arm64 builds for Windows, which caused the arm64 build to always be downloaded. Now, use `--arch` option for Windows releases and defaults to x64.


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index 42697f6..a028958 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "blender-downloader"
-version = "1.0.4"
+version = "1.0.5"
 description = "Blender portable release downloader."
 readme = "README.md"
 license = "BSD-3-Clause"
diff --git a/src/blender_downloader/__init__.py b/src/blender_downloader/__init__.py
index 0b8d2ec..be93bc5 100755
--- a/src/blender_downloader/__init__.py
+++ b/src/blender_downloader/__init__.py
@@ -27,7 +27,7 @@
 __author__ = 'mondeja'
 __description__ = 'Multiplatform Blender portable release downloader script.'
 __title__ = 'blender-downloader'
-__version__ = '1.0.4'
+__version__ = '1.0.5'
 
 TEMPDIR = os.path.join(tempfile.gettempdir(), 'blender-downloader')
 DATA_DIR = user_data_dir(


Test patch:
diff --git a/tests/test_unit/test_get_legacy_release_download_url.py b/tests/test_unit/test_get_legacy_release_download_url.py
index cfa79a7..86d8acc 100644
--- a/tests/test_unit/test_get_legacy_release_download_url.py
+++ b/tests/test_unit/test_get_legacy_release_download_url.py
@@ -21,6 +21,16 @@
 @pytest.mark.parametrize(
     'blender_version',
     (
+        '4.3.0',
+        '4.2.0',
+        '4.1.0',
+        '4.0.0',
+        '3.6.0',
+        '3.5.0',
+        '3.4.0',
+        '3.3.0',
+        '3.2.0',
+        '3.1.0',
         '3.0.0',
         '2.93.1',
         '2.93.0',  # change in release formats
@@ -161,7 +171,9 @@ def assert_url(url_end_schema):
         else:
             assert_url('{blender_version}-OSX_10.6-x86_64.zip')
     elif operative_system == 'windows':
-        if blender_Version >= BlenderVersion('2.93') or (
+        if blender_Version >= BlenderVersion('4.3') and arch == 'arm64':
+            assert_url('{blender_version}-windows-arm64.zip')
+        elif blender_Version >= BlenderVersion('2.93') or (
             blender_Version >= BlenderVersion('2.83.14')
             and blender_Version < BlenderVersion('2.84')
         ):