def execute()

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


    def execute(self):
        os_utils = OSUtils()
        python_path = self.binaries[self.LANGUAGE].binary_path
        try:
            pip = SubprocessPip(osutils=os_utils, python_exe=python_path)
        except MissingPipError as ex:
            raise ActionFailedError(str(ex))
        pip_runner = PipRunner(python_exe=python_path, pip=pip)
        dependency_builder = DependencyBuilder(
            osutils=os_utils, pip_runner=pip_runner, runtime=self.runtime, architecture=self.architecture
        )

        package_builder = PythonPipDependencyBuilder(
            osutils=os_utils, runtime=self.runtime, 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))