File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -673,7 +673,15 @@ def get_pylib_for_platform(vstrPythonInstallDir):
673
673
674
674
from distutils .sysconfig import get_python_lib
675
675
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' :
677
685
dbg .dump_text ("Platform is Fedora Linux" )
678
686
# On Fedora the installation gets split into lib and lib64,
679
687
# which prevents building lldb from completing successfully.
You can’t perform that action at this time.
0 commit comments