This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Replace find_executable with shutil.which
ClosedPublic

Authored by DavidSpickett on Apr 17 2023, 6:32 AM.

Details

Summary

distutils is deprecated and shutil.which is the suggested
replacement for this function.

https://peps.python.org/pep-0632/#migration-advice
https://docs.python.org/3/library/shutil.html#shutil.which

which was added in 3.3 (https://docs.python.org/3/library/shutil.html#shutil.which)
and LLVM requires at least 3.6 (https://llvm.org/docs/GettingStarted.html#software).

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 17 2023, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 6:32 AM
Herald added a subscriber: arichardson. · View Herald Transcript
DavidSpickett requested review of this revision.Apr 17 2023, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 6:32 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Apr 17 2023, 6:35 AM
philnik added a subscriber: philnik.

Thanks for cleaning this up! LGTM assuming the CI is happy.

This revision is now accepted and ready to land.Apr 17 2023, 6:35 AM

AIX is offline and sanitizer failures are pre-existing so I will land this.

This revision was landed with ongoing or failed builds.Apr 17 2023, 8:01 AM
This revision was automatically updated to reflect the committed changes.