Skip to content

Commit f9f3bec

Browse files
opt out of pyproject.toml for self-bootstrap
1 parent 9cfd32d commit f9f3bec

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/setuptools_scm/file_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
if TYPE_CHECKING:
77
from typing_extensions import TypeGuard
8+
from . import _types as _t
89

9-
from . import _types as _t
1010
from .utils import trace
1111

1212

src/setuptools_scm/file_finder_git.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
import subprocess
66
import tarfile
77
from typing import IO
8+
from typing import TYPE_CHECKING
89

9-
from . import _types as _t
1010
from .file_finder import is_toplevel_acceptable
1111
from .file_finder import scm_find_files
1212
from .utils import do_ex
1313
from .utils import trace
1414

15+
if TYPE_CHECKING:
16+
from . import _types as _t
17+
18+
1519
log = logging.getLogger(__name__)
1620

1721

src/setuptools_scm/integration.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
if TYPE_CHECKING:
2020
from . import _types as _t
2121

22+
_SKIP_PYPROJECT_HACK = False
23+
2224

2325
def _warn_on_old_setuptools(_version: str = setuptools.__version__) -> None:
2426
if int(_version.split(".")[0]) < 45:
@@ -107,8 +109,12 @@ def infer_version(dist: setuptools.Distribution) -> None:
107109
vars(dist.metadata),
108110
)
109111
dist_name = dist.metadata.name
112+
if dist_name is None:
113+
dist_name = _read_dist_name_from_setup_cfg()
110114
if not os.path.isfile("pyproject.toml"):
111115
return
116+
if dist_name == "setuptools_scm":
117+
return
112118
try:
113119
config = Configuration.from_file(dist_name=dist_name)
114120
except LookupError as e:

0 commit comments

Comments
 (0)