Skip to content

Commit e66742b

Browse files
authored
Merge pull request #1931 from tachoknight/stable
apple-llvm-split-commit: 204fe5fc044611c539109896d71735371d566d49 apple-llvm-split-dir: lldb/
2 parents 8f1d21e + a5a48c9 commit e66742b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lldb/scripts/Python/finishSwigPythonLLDB.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,15 @@ def get_pylib_for_platform(vstrPythonInstallDir):
673673

674674
from distutils.sysconfig import get_python_lib
675675
if platform.system() == 'Linux':
676-
if platform.linux_distribution()[0] == 'Fedora':
676+
linux_distro = ''
677+
# platform.linux_distribution() is not available in
678+
# Python >= 3.8
679+
if sys.version_info[0] >= 3 and sys.version_info[1] >= 8:
680+
from distro import linux_distribution
681+
linux_distro = linux_distribution()[0]
682+
else:
683+
linux_distro = platform.linux_distribution()[0]
684+
if linux_distro == 'Fedora':
677685
dbg.dump_text("Platform is Fedora Linux")
678686
# On Fedora the installation gets split into lib and lib64,
679687
# which prevents building lldb from completing successfully.

0 commit comments

Comments
 (0)