Ensure cfg is removed, and add a message

This commit is contained in:
Steve Dower
2022-08-24 00:32:20 +01:00
parent b8ac98ee9f
commit dcc5c00a3d
+4
View File
@@ -174,6 +174,8 @@ def setup_setuptools_cross_compile(
f"Unable to configure setuptools for cross-compiling because {distutils_cfg} is a directory"
)
return
else:
atexit.register(lambda: distutils_cfg.unlink)
# Ensure our additional import libraries are made available, and explicitly
# set the platform name
@@ -183,6 +185,8 @@ def setup_setuptools_cross_compile(
distutils_cfg.write_text(
textwrap.dedent(
f"""\
# I am a temporary configuration file generated by cibuildwheel.
# Please remove me or I will likely break your other builds.
[build]
plat_name={plat_name}
[build_ext]