Skip to content

Commit 1237bdb

Browse files
authored
Merge pull request #2 from coherent-oss/bugfix/1-no-distutils-dep
Don't infer distutils as a dependency
2 parents 139997a + 32b4d79 commit 1237bdb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,8 @@ def announce(self, msg: object, level: int = 1) -> None:
11411141
log.debug(msg)
11421142

11431143
def debug_print(self, msg: object) -> None:
1144-
from distutils.debug import DEBUG
1144+
# distutils is supplied by the consumer on this legacy path
1145+
from distutils.debug import DEBUG # deps: ignore[inferred-dependency]
11451146

11461147
if DEBUG:
11471148
print(msg)
@@ -1185,8 +1186,10 @@ def spawn(
11851186
stacklevel=2,
11861187
)
11871188
# translation shared with distutils.spawn.spawn; imported late so the
1188-
# clean `call` path stays free of the distutils dependency.
1189-
from distutils.spawn import _translate_errors
1189+
# clean `call` path stays free of the distutils dependency
1190+
from distutils.spawn import ( # deps: ignore[inferred-dependency]
1191+
_translate_errors,
1192+
)
11901193

11911194
with _translate_errors(cmd):
11921195
self.call(cmd, env=env, **kwargs)

0 commit comments

Comments
 (0)