elf_diff
elf_diff copied to clipboard
auxiliary: use shutil instead of distutils for recursiveCopy
distutils does not exist in Pythons >= 3.12, so the program does not work since the import fails. Instead, when possible, use shutil to provide a tree copy function.
The relevant difference between the two implementations is that distutils' version does not raise an error if the destination directory exists. Unfortunately, the flag to match this behavior, only exists in shutil's implementation on Pythons >= 3.8. Therefore, we fall back on distutils to preserve compatibility with these EOL versions.
Tested that elf_diff now starts and works on Python 3.12 using the html_dir exporter.