elf_diff icon indicating copy to clipboard operation
elf_diff copied to clipboard

auxiliary: use shutil instead of distutils for recursiveCopy

Open tpwrules opened this issue 6 months ago • 0 comments

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.

tpwrules avatar Jul 07 '25 17:07 tpwrules