mirror of
https://github.com/servo/servo.git
synced 2025-07-18 21:03:45 +01:00
Use linux_distribution() from distro package instead of builtin platform module
platform.linux_distribution() is deprecated since Python 3.5 and will be removed with Python 3.8.
This commit is contained in:
parent
0aa6314ee2
commit
4d6f28df35
3 changed files with 25 additions and 17 deletions
|
@ -18,10 +18,12 @@ import locale
|
|||
import os
|
||||
from os import path
|
||||
import platform
|
||||
import distro
|
||||
import re
|
||||
import contextlib
|
||||
import subprocess
|
||||
from subprocess import PIPE
|
||||
import six
|
||||
import sys
|
||||
import tarfile
|
||||
import zipfile
|
||||
|
@ -679,8 +681,10 @@ install them, let us know by filing a bug!")
|
|||
append_to_path_env(path.join(libpath, "pkgconfig"), env, "PKG_CONFIG_PATH")
|
||||
|
||||
if sys.platform == "linux2":
|
||||
distro, version, _ = platform.linux_distribution()
|
||||
if distro == "Ubuntu" and (version == "16.04" or version == "14.04"):
|
||||
distrib, version, _ = distro.linux_distribution()
|
||||
distrib = six.ensure_str(distrib)
|
||||
version = six.ensure_str(version)
|
||||
if distrib == "Ubuntu" and (version == "16.04" or version == "14.04"):
|
||||
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
|
||||
|
||||
if extra_path:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue