mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 03:13:04 +03:00
Pass strings or tuples of strings to _dbg
This commit is contained in:
parent
1557585411
commit
18f8af78d3
5
setup.py
5
setup.py
|
@ -16,7 +16,6 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from setuptools import Extension, setup
|
from setuptools import Extension, setup
|
||||||
from setuptools.command.build_ext import build_ext
|
from setuptools.command.build_ext import build_ext
|
||||||
|
@ -148,7 +147,7 @@ class RequiredDependencyException(Exception):
|
||||||
PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version
|
PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version
|
||||||
|
|
||||||
|
|
||||||
def _dbg(s: str, tp: Any = None) -> None:
|
def _dbg(s: str, tp: str | tuple[str, ...] | None = None) -> None:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
if tp:
|
if tp:
|
||||||
print(s % tp)
|
print(s % tp)
|
||||||
|
@ -732,7 +731,7 @@ class pil_build_ext(build_ext):
|
||||||
best_path = os.path.join(directory, name)
|
best_path = os.path.join(directory, name)
|
||||||
_dbg(
|
_dbg(
|
||||||
"Best openjpeg version %s so far in %s",
|
"Best openjpeg version %s so far in %s",
|
||||||
(best_version, best_path),
|
(str(best_version), best_path),
|
||||||
)
|
)
|
||||||
|
|
||||||
if best_version and _find_library_file(self, "openjp2"):
|
if best_version and _find_library_file(self, "openjp2"):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user