def execute()

in aws_lambda_builders/workflows/python_pip/actions.py [0:0]


    def execute(self) -> None:
        """
        Executes the build action for Python `pip` workflows.
        """
        pip, python_with_pip = self._find_runtime_with_pip()
        pip_runner = PipRunner(python_exe=python_with_pip, pip=pip)

        dependency_builder = DependencyBuilder(
            osutils=self._os_utils,
            python_exe=python_with_pip,
            pip_runner=pip_runner,
            runtime=self.runtime,
            architecture=self.architecture,
        )

        package_builder = PythonPipDependencyBuilder(
            osutils=self._os_utils,
            runtime=self.runtime,
            python_exe=python_with_pip,
            dependency_builder=dependency_builder,
        )
        try:
            target_artifact_dir = self.artifacts_dir
            # if dependencies folder is provided, download the dependencies into dependencies folder
            if self.dependencies_dir:
                target_artifact_dir = self.dependencies_dir

            package_builder.build_dependencies(
                artifacts_dir_path=target_artifact_dir,
                scratch_dir_path=self.scratch_dir,
                requirements_path=self.manifest_path,
            )
        except PackagerError as ex:
            raise ActionFailedError(str(ex))