Commit: 8bddbc9a944965c431bbef4c0158f5581575791e
Author: Brecht Van Lommel
Date:   Mon Oct 31 19:31:58 2022 +0100
Branches: master
https://developer.blender.org/rB8bddbc9a944965c431bbef4c0158f5581575791e

Fix bpy wheel build error on Windows, where there are no abi flags

===================================================================

M       build_files/utils/make_bpy_wheel.py

===================================================================

diff --git a/build_files/utils/make_bpy_wheel.py 
b/build_files/utils/make_bpy_wheel.py
index ba1d0f21937..81d267c6e10 100755
--- a/build_files/utils/make_bpy_wheel.py
+++ b/build_files/utils/make_bpy_wheel.py
@@ -208,12 +208,15 @@ def main() -> None:
     dist_dir = os.path.join(install_dir, "dist")
     for f in os.listdir(dist_dir):
         if f.endswith(".whl"):
-            # No apparent way to override this ABI version with setuptools, so 
rename.
-            sys_py = "cp%d%d" % (sys.version_info.major, 
sys.version_info.minor)
-            sys_py_abi = sys_py + sys.abiflags
             blender_py = "cp%d%d" % (python_version_number[0], 
python_version_number[1])
 
-            renamed_f = f.replace(sys_py_abi, blender_py).replace(sys_py, 
blender_py)
+            # No apparent way to override this ABI version with setuptools, so 
rename.
+            sys_py = "cp%d%d" % (sys.version_info.major, 
sys.version_info.minor)
+            if hasattr(sys, "abiflags"):
+                sys_py_abi = sys_py + sys.abiflags
+                renamed_f = f.replace(sys_py_abi, blender_py).replace(sys_py, 
blender_py)
+            else:
+                renamed_f = f.replace(sys_py, blender_py)
 
             os.rename(os.path.join(dist_dir, f), os.path.join(output_dir, 
renamed_f))

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to