Skip to content

Commit b76ba89

Browse files
finish migrating to using canonical package nmes for match setuptools_scm in bild deps
1 parent abb6185 commit b76ba89

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/setuptools_scm/_integration/pyproject_reading.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ def verify_dynamic_version_when_required(self) -> None:
7373

7474

7575
def has_build_package(
76-
requires: Sequence[str], build_package_names: Sequence[str]
76+
requires: Sequence[str], canonical_build_package_name: str
7777
) -> bool:
7878
for requirement in requires:
79-
package_name = extract_package_name(requirement).lower()
80-
if package_name in build_package_names:
79+
package_name = extract_package_name(requirement)
80+
if package_name == canonical_build_package_name:
8181
return True
8282
return False
8383

8484

8585
def read_pyproject(
8686
path: Path = Path("pyproject.toml"),
8787
tool_name: str = "setuptools_scm",
88-
build_package_names: Sequence[str] = ("setuptools_scm", "setuptools-scm"),
88+
canonical_build_package_name: str = "setuptools-scm",
8989
missing_section_ok: bool = False,
9090
missing_file_ok: bool = False,
9191
) -> PyProjectData:
@@ -107,7 +107,7 @@ def read_pyproject(
107107
raise
108108

109109
requires: list[str] = defn.get("build-system", {}).get("requires", [])
110-
is_required = has_build_package(requires, build_package_names)
110+
is_required = has_build_package(requires, canonical_build_package_name)
111111

112112
try:
113113
section = defn.get("tool", {})[tool_name]

0 commit comments

Comments
 (0)