Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-16 03:49:49 +0300
committerCampbell Barton <campbell@blender.org>2022-09-16 03:52:20 +0300
commit8342564796346b297c40a1fc1f57e6b8e10798c0 (patch)
tree139fb2f2d9c7237b8b50413b46edb2c341851fc6 /build_files/utils/make_bpy_wheel.py
parentd5df23d7581230da7ab5cfd5764a46f7f7941759 (diff)
Cleanup: suppress type warnings for make_bpy_wheel & make_utils
'make check_mypy' now runs without warnings.
Diffstat (limited to 'build_files/utils/make_bpy_wheel.py')
-rwxr-xr-xbuild_files/utils/make_bpy_wheel.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/build_files/utils/make_bpy_wheel.py b/build_files/utils/make_bpy_wheel.py
index e98e8570212..f695bdae68a 100755
--- a/build_files/utils/make_bpy_wheel.py
+++ b/build_files/utils/make_bpy_wheel.py
@@ -7,15 +7,15 @@ import os
import re
import platform
import string
-import setuptools
+import setuptools # type: ignore
import sys
from typing import (
Generator,
- Tuple,
List,
Optional,
Sequence,
+ Tuple,
)
@@ -108,8 +108,12 @@ def main() -> None:
elif sys.platform == "win32":
platform_tag = "win_%s" % (platform.machine().lower())
elif sys.platform == "linux":
- glibc = os.confstr("CS_GNU_LIBC_VERSION").split()[1].split(".")
- platform_tag = "manylinux_%s_%s_%s" % (glibc[0], glibc[1], platform.machine().lower())
+ glibc = os.confstr("CS_GNU_LIBC_VERSION")
+ if glibc is None:
+ print("Unable to find \"CS_GNU_LIBC_VERSION\", aborting!")
+ sys.exit(1)
+ glibc = "%s_%s" % tuple(glibc.split()[1].split(".")[:2])
+ platform_tag = "manylinux_%s_%s" % (glibc, platform.machine().lower())
else:
print("Unsupported platform %s" % (sys.platform))
sys.exit(1)
@@ -124,8 +128,8 @@ def main() -> None:
return paths
# Ensure this wheel is marked platform specific.
- class BinaryDistribution(setuptools.dist.Distribution):
- def has_ext_modules(foo):
+ class BinaryDistribution(setuptools.dist.Distribution): # type: ignore
+ def has_ext_modules(self) -> bool:
return True
# Build wheel.