Bug 1868690 - add --no-use-pep517 and remove two_pass from mozbase. r=releng-reviewers,gbrown

Differential Revision: https://phabricator.services.mozilla.com/D201231
This commit is contained in:
Joel Maher 2024-03-10 13:56:35 +00:00
Родитель 34b7da2258
Коммит 6bb4a62c85
12 изменённых файлов: 16 добавлений и 31 удалений

Просмотреть файл

@ -128,7 +128,6 @@ class VirtualenvMixin(object):
method=None,
requirements=None,
optional=False,
two_pass=False,
editable=False,
):
"""Register a module to be installed with the virtualenv.
@ -140,7 +139,7 @@ class VirtualenvMixin(object):
applied.
"""
self._virtualenv_modules.append(
(name, url, method, requirements, optional, two_pass, editable)
(name, url, method, requirements, optional, editable)
)
def query_virtualenv_path(self):
@ -291,6 +290,9 @@ class VirtualenvMixin(object):
command = [pip, "install"]
if no_deps:
command += ["--no-deps"]
command += ["--no-use-pep517"]
# To avoid timeouts with our pypi server, increase default timeout:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1007230#c802
command += ["--timeout", str(c.get("pip_timeout", 120))]
@ -625,19 +627,8 @@ class VirtualenvMixin(object):
method,
requirements,
optional,
two_pass,
editable,
) in self._virtualenv_modules:
if two_pass:
self.install_module(
module=module,
module_url=url,
install_method=method,
requirements=requirements or (),
optional=optional,
no_deps=True,
editable=editable,
)
self.install_module(
module=module,
module_url=url,
@ -1133,6 +1124,8 @@ class Python3Virtualenv(object):
if c.get("find_links") and not c["pip_index"]:
pip_args += ["--no-index"]
pip_args += ["--no-use-pep517"]
# Add --find-links pages to look at. Add --trusted-host automatically if
# the host isn't secure. This allows modern versions of pip to connect
# without requiring an override.

Просмотреть файл

@ -29,4 +29,4 @@ class MozbaseMixin(object):
"Could not find mozbase requirements file: {}".format(requirements)
)
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])

Просмотреть файл

@ -1198,7 +1198,6 @@ class Raptor(
)
self.register_virtualenv_module(
requirements=[mozbase_requirements],
two_pass=True,
editable=True,
)

Просмотреть файл

@ -794,7 +794,6 @@ class Talos(
)
self.register_virtualenv_module(
requirements=[mozbase_requirements],
two_pass=True,
editable=True,
)
super(Talos, self).create_virtualenv()

Просмотреть файл

@ -450,7 +450,7 @@ class AndroidEmulatorTest(
"websocketprocessbridge_requirements_3.txt",
)
if requirements:
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
def download_and_extract(self):
"""

Просмотреть файл

@ -380,7 +380,7 @@ class AndroidHardwareTest(
"websocketprocessbridge_requirements_3.txt",
)
if requirements:
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
def download_and_extract(self):
"""

Просмотреть файл

@ -155,9 +155,7 @@ class AWSY(TestingMixin, MercurialScript, TooltoolMixin, CodeCoverageMixin):
]
for requirements_file in requirements_files:
self.register_virtualenv_module(
requirements=[requirements_file], two_pass=True
)
self.register_virtualenv_module(requirements=[requirements_file])
self.register_virtualenv_module("awsy", self.awsy_path)

Просмотреть файл

@ -546,9 +546,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM
)
for requirements_file in requirements_files:
self.register_virtualenv_module(
requirements=[requirements_file], two_pass=True
)
self.register_virtualenv_module(requirements=[requirements_file])
_python_interp = self.query_exe("python")
if "win" in self.platform_name() and os.path.exists(_python_interp):

Просмотреть файл

@ -128,7 +128,7 @@ class FirefoxUIFunctionalTests(TestingMixin, VCSToolsScript, CodeCoverageMixin):
requirements = os.path.join(
dirs["abs_test_install_dir"], "config", "firefox_ui_requirements.txt"
)
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
def download_and_extract(self):
"""Override method from TestingMixin for more specific behavior."""

Просмотреть файл

@ -257,7 +257,7 @@ class MarionetteTest(TestingMixin, MercurialScript, TransferMixin, CodeCoverageM
"Could not find marionette requirements file: {}".format(requirements)
)
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
def _get_test_suite(self, is_emulator):
"""

Просмотреть файл

@ -138,7 +138,7 @@ class TelemetryTests(TestingMixin, VCSToolsScript, CodeCoverageMixin):
"config",
"telemetry_tests_requirements.txt",
)
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
def query_abs_dirs(self):
if self.abs_dirs:

Просмотреть файл

@ -305,7 +305,7 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM
dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
)
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
self.register_virtualenv_module(requirements=[requirements])
webtransport_requirements = os.path.join(
dirs["abs_test_install_dir"],
@ -316,9 +316,7 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM
"requirements.txt",
)
self.register_virtualenv_module(
requirements=[webtransport_requirements], two_pass=True
)
self.register_virtualenv_module(requirements=[webtransport_requirements])
def _query_geckodriver(self):
path = None