mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Call startswith once with a tuple (#8998)
This commit is contained in:
commit
8e5a15bab7
8
setup.py
8
setup.py
|
@ -163,7 +163,7 @@ def _find_library_dirs_ldconfig() -> list[str]:
|
||||||
args: list[str]
|
args: list[str]
|
||||||
env: dict[str, str]
|
env: dict[str, str]
|
||||||
expr: str
|
expr: str
|
||||||
if sys.platform.startswith("linux") or sys.platform.startswith("gnu"):
|
if sys.platform.startswith(("linux", "gnu")):
|
||||||
if struct.calcsize("l") == 4:
|
if struct.calcsize("l") == 4:
|
||||||
machine = os.uname()[4] + "-32"
|
machine = os.uname()[4] + "-32"
|
||||||
else:
|
else:
|
||||||
|
@ -623,11 +623,7 @@ class pil_build_ext(build_ext):
|
||||||
|
|
||||||
for extension in self.extensions:
|
for extension in self.extensions:
|
||||||
extension.extra_compile_args = ["-Wno-nullability-completeness"]
|
extension.extra_compile_args = ["-Wno-nullability-completeness"]
|
||||||
elif (
|
elif sys.platform.startswith(("linux", "gnu", "freebsd")):
|
||||||
sys.platform.startswith("linux")
|
|
||||||
or sys.platform.startswith("gnu")
|
|
||||||
or sys.platform.startswith("freebsd")
|
|
||||||
):
|
|
||||||
for dirname in _find_library_dirs_ldconfig():
|
for dirname in _find_library_dirs_ldconfig():
|
||||||
_add_directory(library_dirs, dirname)
|
_add_directory(library_dirs, dirname)
|
||||||
if sys.platform.startswith("linux") and os.environ.get("ANDROID_ROOT"):
|
if sys.platform.startswith("linux") and os.environ.get("ANDROID_ROOT"):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user