We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 78b6240 + 4722707 commit 2ee096aCopy full SHA for 2ee096a
language_tool_python/download_lt.py
@@ -13,7 +13,7 @@
13
from typing import Optional
14
import zipfile
15
16
-from distutils.spawn import find_executable
+from shutil import which
17
from urllib.parse import urljoin
18
from .utils import (
19
find_existing_language_tool_downloads,
@@ -42,7 +42,6 @@
42
r'^(?:java|openjdk) [version ]?(?P<major1>\d+)\.(?P<major2>\d+)',
43
re.MULTILINE)
44
45
-
46
def parse_java_version(version_text):
47
"""Return Java version (major1, major2).
48
@@ -74,7 +73,7 @@ def parse_java_version(version_text):
74
73
75
def confirm_java_compatibility():
76
""" Confirms Java major version >= 8. """
77
- java_path = find_executable('java')
+ java_path = which('java')
78
if not java_path:
79
raise ModuleNotFoundError(
80
'No java install detected. '
0 commit comments