diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
commit | a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 (patch) | |
tree | 54617b4f5f04ee87a2c9e3b97cc88b8626859124 /python/mozbuild | |
parent | Releasing progress-linux version 115.7.0esr-1~deb12u1progress7u1. (diff) | |
download | firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.tar.xz firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.zip |
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'python/mozbuild')
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 6 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/nodeutil.py | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 2297d586b8..c00afd1c01 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -29,6 +29,7 @@ from mach.decorators import ( SettingsProvider, SubCommand, ) +from mozfile import load_source from voluptuous import All, Boolean, Required, Schema import mozbuild.settings # noqa need @SettingsProvider hook to execute @@ -1099,11 +1100,10 @@ def android_gtest( # run gtest via remotegtests.py exit_code = 0 - import imp path = os.path.join("testing", "gtest", "remotegtests.py") - with open(path, "r") as fh: - imp.load_module("remotegtests", fh, path, (".py", "r", imp.PY_SOURCE)) + load_source("remotegtests", path) + import remotegtests tester = remotegtests.RemoteGTests() diff --git a/python/mozbuild/mozbuild/nodeutil.py b/python/mozbuild/mozbuild/nodeutil.py index 8ec724ab89..42f2627cd9 100644 --- a/python/mozbuild/mozbuild/nodeutil.py +++ b/python/mozbuild/mozbuild/nodeutil.py @@ -5,14 +5,14 @@ import os import platform import subprocess -from distutils.version import StrictVersion from mozboot.util import get_tools_dir from mozfile import which +from packaging.version import Version from six import PY3 -NODE_MIN_VERSION = StrictVersion("12.22.12") -NPM_MIN_VERSION = StrictVersion("6.14.16") +NODE_MIN_VERSION = Version("12.22.12") +NPM_MIN_VERSION = Version("6.14.16") def find_node_paths(): @@ -68,7 +68,7 @@ def check_executable_version(exe, wrap_call_with_node=False): .lstrip("v") .rstrip() ) - return StrictVersion(out) + return Version(out) def find_node_executable( @@ -87,7 +87,7 @@ def find_node_executable( return None, None if version >= min_version: - return nodejs_exe, version.version + return nodejs_exe, version.release return None, None @@ -123,4 +123,4 @@ def find_executable(name, min_version, use_node_for_version_check=False): if version < min_version: return None, None - return exe, version.version + return exe, version.release |