Just filing this one for completeness as I don't think we plan on fixing cpython (maybe we should, not sure.) This is fixed upstream in: - setuptools at https://github.com/pypa/distutils/pull/195, landed in >=dev-python/setuptools-67.2.0 - distutils at https://github.com/pypa/distutils/pull/195 - not fixed in dev-lang/python (cpython) and no plan to: https://github.com/python/cpython/issues/98529.
I don't exactly mind backporting the change from distutils if it applies but don't really consider it of great importance either.