File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
if TYPE_CHECKING :
7
7
from typing_extensions import TypeGuard
8
+ from . import _types as _t
8
9
9
- from . import _types as _t
10
10
from .utils import trace
11
11
12
12
Original file line number Diff line number Diff line change 5
5
import subprocess
6
6
import tarfile
7
7
from typing import IO
8
+ from typing import TYPE_CHECKING
8
9
9
- from . import _types as _t
10
10
from .file_finder import is_toplevel_acceptable
11
11
from .file_finder import scm_find_files
12
12
from .utils import do_ex
13
13
from .utils import trace
14
14
15
+ if TYPE_CHECKING :
16
+ from . import _types as _t
17
+
18
+
15
19
log = logging .getLogger (__name__ )
16
20
17
21
Original file line number Diff line number Diff line change 19
19
if TYPE_CHECKING :
20
20
from . import _types as _t
21
21
22
+ _SKIP_PYPROJECT_HACK = False
23
+
22
24
23
25
def _warn_on_old_setuptools (_version : str = setuptools .__version__ ) -> None :
24
26
if int (_version .split ("." )[0 ]) < 45 :
@@ -107,8 +109,12 @@ def infer_version(dist: setuptools.Distribution) -> None:
107
109
vars (dist .metadata ),
108
110
)
109
111
dist_name = dist .metadata .name
112
+ if dist_name is None :
113
+ dist_name = _read_dist_name_from_setup_cfg ()
110
114
if not os .path .isfile ("pyproject.toml" ):
111
115
return
116
+ if dist_name == "setuptools_scm" :
117
+ return
112
118
try :
113
119
config = Configuration .from_file (dist_name = dist_name )
114
120
except LookupError as e :
You can’t perform that action at this time.
0 commit comments