# Path: datapackage_pipelines/utilities/extended_json.py
# class json(object):
#     dumps = _dumps
#     loads = _loads
#     dumpl = _dumpl
#     loadl = _loadl
#     dump = _dump
#     load = _load
#     JSONDecodeError = _json.JSONDecodeError
# 
# Path: datapackage_pipelines/manager/runners/base_runner.py
# class BaseRunner(object):
# 
#     def __init__(self, name, parameters):
#         self.name = name
#         self.parameters = parameters
# 
#     def get_execution_args(self, step, cwd, idx):
#         raise NotImplementedError()


import os
import sys
import shlex
from ...utilities.extended_json import json
from .base_runner import BaseRunner



class LocalPythonRunner(BaseRunner):

    def get_execution_args(self, step, _, idx):
        return [
            sys.executable,
            step['executor'],
            str(idx),

# Path: datapackage_pipelines/utilities/extended_json.py
# class json(object):
#     dumps = _dumps
#     loads = _loads
#     dumpl = _dumpl
#     loadl = _loadl
#     dump = _dump
#     load = _load
#     JSONDecodeError = _json.JSONDecodeError
# 
# Path: datapackage_pipelines/manager/runners/base_runner.py
# class BaseRunner(object):
# 
#     def __init__(self, name, parameters):
#         self.name = name
#         self.parameters = parameters
# 
#     def get_execution_args(self, step, cwd, idx):
#         raise NotImplementedError()


# Path: datapackage_pipelines/manager/runners/local_python.py
import os
import sys
import shlex
from ...utilities.extended_json import json
from .base_runner import BaseRunner




class LocalPythonRunner(BaseRunner):

    def get_execution_args(self, step, _, idx):
        return [
            sys.executable,
            step['executor'],
            str(idx),

            json.dumps(step.get('parameters', {})),