Skip to content

Commit 42311f2

Browse files
authored
Merge pull request #49 from aboutcode-org/update-7zip-system-provided
Check for possible 7zip executable names
2 parents f979c13 + 2502f4a commit 42311f2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

builtins/extractcode_7z_system_provided/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
setup(
1616
name='extractcode_7z_system_provided',
17-
version='33.0.0',
17+
version='33.0.1',
1818
license='apache-2.0 AND lgpl-2.1 and unrar and brian-gladman-3-clause',
1919
description=desc,
2020
long_description=desc,

builtins/extractcode_7z_system_provided/src/extractcode_7z/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def get_locations(self):
4444

4545
if any(dist in debian_based_distro for dist in distribution):
4646
lib_dir = '/usr/bin'
47-
lib_7z = path.join(lib_dir, '7z')
47+
for bin_name in ('7z', '7zz'):
48+
lib_7z = path.join(lib_dir, bin_name)
49+
if path.exists(lib_7z):
50+
break
4851
elif any(dist in rpm_based_distro for dist in distribution):
4952
# 7zip proper is not available on dnf
5053
lib_dir = '/usr/libexec/p7zip'

0 commit comments

Comments
 (0)