def execute_local(self, root="build", *, env=None):
        """
        Execute build plan using the local strategy. Files from the build plan are placed in
        the build root directory ``root``, and, if ``run_script`` is ``True``, the script
        appropriate for the platform (``{script}.bat`` on Windows, ``{script}.sh`` elsewhere)
        is executed in the build root. If ``env`` is not ``None``, the environment is replaced
        with ``env``.

        The ``run_script`` argument is deprecated. If you only want to extract the files
        into a local folder, use the ``extract`` method.

        Returns :class:`LocalBuildProducts`.
        """
        build_dir = self.extract(root)
        if sys.platform.startswith("win32"):
            # Without "call", "cmd /c {}.bat" will return 0.
            # See https://stackoverflow.com/a/30736987 for a detailed explanation of why.
            # Running the script manually from a command prompt is unaffected.
            subprocess.check_call(["cmd", "/c", f"call {self.script}.bat"],
                                    cwd=build_dir, env=os.environ if env is None else env)
        else:
            subprocess.check_call(["sh", f"{self.script}.sh"],
                                    cwd=build_dir, env=os.environ if env is None else env)
        return LocalBuildProducts(build_dir)

        Execute build plan using the local strategy. Files from the build plan are placed in
        the build root directory ``root``, and, if ``run_script`` is ``True``, the script
        appropriate for the platform (``{script}.bat`` on Windows, ``{script}.sh`` elsewhere)
        is executed in the build root. If ``env`` is not ``None``, the environment is replaced
        with ``env``.

        The ``run_script`` argument is deprecated. If you only want to extract the files
        into a local folder, use the ``extract`` method.

        Returns :class:`LocalBuildProducts`.
        
amaranth/build/run.py