Skip to content

Commit 10d495c

Browse files
authored
Restore "delayed" aspect of existing import of pkg_resources in setuptools/installer.py (#4994)
2 parents 75fd24e + 2d2d3b6 commit 10d495c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setuptools/installer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
import sys
77
import tempfile
88
from functools import partial
9-
10-
from pkg_resources import Distribution
9+
from typing import TYPE_CHECKING
1110

1211
from . import _reqs
1312
from ._reqs import _StrOrIter
@@ -17,6 +16,9 @@
1716
from distutils import log
1817
from distutils.errors import DistutilsError
1918

19+
if TYPE_CHECKING:
20+
from pkg_resources import Distribution
21+
2022

2123
def _fixup_find_links(find_links):
2224
"""Ensure find-links option end-up being a list of strings."""

0 commit comments

Comments
 (0)