Commit 61c7f9da authored by Norisz Fay's avatar Norisz Fay
Browse files

Backed out changeset 9b440a541620 (bug 1838763) as requested by dev for causing Bug 1839369

parent 7cec6117
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -317,6 +317,7 @@ def _activate_build_virtualenv():
    # virtualenv), so we should activate the build virtualenv as expected by the rest of
    # configure.

    topobjdir = os.path.realpath(".")
    topsrcdir = os.path.realpath(os.path.dirname(__file__))

    mach_site = MachSiteManager(
@@ -327,14 +328,11 @@ def _activate_build_virtualenv():
        SitePackagesSource.NONE,
    )
    mach_site.activate()

    from mach.util import get_virtualenv_base_dir

    build_site = CommandSiteManager.from_environment(
        topsrcdir,
        None,
        "build",
        get_virtualenv_base_dir(topsrcdir),
        os.path.join(topobjdir, "_virtualenvs"),
    )
    if not build_site.ensure():
        print("Created Python 3 virtualenv")
+2 −3
Original line number Diff line number Diff line
@@ -675,11 +675,10 @@ if args.variant == "wasi":

# Generate stacks from minidumps.
if use_minidump:
    venv_python = os.path.join(OBJDIR, "_virtualenvs", "build", "bin", "python3")
    run_command(
        [
            mach,
            "python",
            "virtualenv=build",
            venv_python,
            os.path.join(DIR.source, "testing/mozbase/mozcrash/mozcrash/mozcrash.py"),
            os.getenv("TMPDIR", "/tmp"),
            os.path.join(OBJDIR, "dist/crashreporter-symbols"),
+0 −7
Original line number Diff line number Diff line
@@ -85,13 +85,6 @@ def get_state_dir(
    return str(state_dir)


def get_virtualenv_base_dir(topsrcdir):
    return os.path.join(
        get_state_dir(specific_to_topsrcdir=True, topsrcdir=topsrcdir),
        "_virtualenvs",
    )


def win_to_msys_path(path: Path):
    """Convert a windows-style path to msys-style."""
    drive, path = os.path.splitdrive(path)
+2 −2
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ class MozbuildObject(ProcessExecutionMixin):
    @property
    def virtualenv_manager(self):
        from mach.site import CommandSiteManager
        from mach.util import get_state_dir, get_virtualenv_base_dir
        from mozboot.util import get_state_dir

        if self._virtualenv_manager is None:
            self._virtualenv_manager = CommandSiteManager.from_environment(
@@ -263,7 +263,7 @@ class MozbuildObject(ProcessExecutionMixin):
                    specific_to_topsrcdir=True, topsrcdir=self.topsrcdir
                ),
                self._virtualenv_name,
                get_virtualenv_base_dir(self.topsrcdir),
                os.path.join(self.topobjdir, "_virtualenvs"),
            )

        return self._virtualenv_manager
+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ def build(
            keep_going=keep_going,
            mach_context=command_context._mach_context,
            append_env=append_env,
            virtualenv_topobjdir=orig_topobjdir,
        )
        if status != 0:
            return status
Loading