Skip to content

Commit f7b5726

Browse files
committed
require types-setuptools>=75.2.0
this is necessary to have python/typeshed#12791
1 parent 9642192 commit f7b5726

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.ci/requirements-mypy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ sphinx
99
types-atheris
1010
types-defusedxml
1111
types-olefile
12-
types-setuptools
12+
types-setuptools>=75.2.0

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
import sys
1717
import warnings
1818
from collections.abc import Iterator
19-
from typing import Any
19+
from typing import TYPE_CHECKING, Any
2020

2121
from setuptools import Extension, setup
2222
from setuptools.command.build_ext import build_ext
2323

24+
if TYPE_CHECKING:
25+
from setuptools import _BuildInfo
26+
2427

2528
def get_version() -> str:
2629
version_file = "src/PIL/_version.py"
@@ -1001,7 +1004,7 @@ def debug_build() -> bool:
10011004
return hasattr(sys, "gettotalrefcount") or FUZZING_BUILD
10021005

10031006

1004-
libraries = [
1007+
libraries: list[tuple[str, _BuildInfo]] = [
10051008
("pil_imaging_mode", {"sources": ["src/libImaging/Mode.c"]}),
10061009
]
10071010

0 commit comments

Comments
 (0)