Revert "upgrade 7z to 7zz (#1005)"

This reverts commit 17c0a73f9f.
This commit is contained in:
Alex Xu authored and GitHub committed 2025-07-03 12:24:54 -07:00
1 parent 0abf620698
commit 21249854b9
7 files changed
+32 -33

No files matched your search

+14
View File
@@ -18,6 +18,7 @@
# PERFORMANCE OF THIS SOFTWARE.
#
from functools import lru_cache
import os
from html.parser import HTMLParser
import subprocess
@@ -124,6 +125,19 @@ def dependencyCheck(level):
print('ERROR: ' + ', '.join(missing) + ' is not installed!')
sys.exit(1)
@lru_cache
def available_archive_tools():
available = []
for tool in ['tar', '7z', 'unar', 'unrar']:
try:
subprocess_run([tool], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
available.append(tool)
except (FileNotFoundError, subprocess.CalledProcessError):
pass
return available
def subprocess_run(command, **kwargs):
if (os.name == 'nt'):
kwargs.setdefault('creationflags', subprocess.CREATE_NO_WINDOW)