mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
webconfig: Remove LooseVersion
This writes super cheesy version checking, but allows us to remove distutils. Fixes #7514. Hat tip @zanchey for the check.
This commit is contained in:
@@ -7,7 +7,6 @@ try:
|
|||||||
from html import escape as escape_html
|
from html import escape as escape_html
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from cgi import escape as escape_html
|
from cgi import escape as escape_html
|
||||||
from distutils.version import LooseVersion
|
|
||||||
import glob
|
import glob
|
||||||
import multiprocessing.pool
|
import multiprocessing.pool
|
||||||
import operator
|
import operator
|
||||||
@@ -44,8 +43,10 @@ def find_executable(exe):
|
|||||||
|
|
||||||
def isMacOS10_12_5_OrLater():
|
def isMacOS10_12_5_OrLater():
|
||||||
""" Return whether this system is macOS 10.12.5 or a later version. """
|
""" Return whether this system is macOS 10.12.5 or a later version. """
|
||||||
version = platform.mac_ver()[0]
|
try:
|
||||||
return version and LooseVersion(version) >= LooseVersion("10.12.5")
|
return [int(x) for x in platform.mac_ver()[0].split(".")] >= [10, 12, 5]
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def is_wsl():
|
def is_wsl():
|
||||||
|
|||||||
Reference in New Issue
Block a user