Backport the distutils part of r83399 to fix #7645.
2 files changed