(compiler: string, args: string[], options: ExecutionOptions)
| 43 | } |
| 44 | |
| 45 | override exec(compiler: string, args: string[], options: ExecutionOptions) { |
| 46 | if (compiler.endsWith('.py')) { |
| 47 | const python = this.env.ceProps<string>('python3'); |
| 48 | options = options || {}; |
| 49 | |
| 50 | const matches = compiler.match(/^(.*)(\/ppci\/)(.*).py/); |
| 51 | if (matches) { |
| 52 | const pythonPath = matches[1]; |
| 53 | const ppciName = `ppci.${matches[3].replace('/', '.')}`; |
| 54 | options.env = {PYTHONPATH: pythonPath}; |
| 55 | const python_args = ['-m', ppciName].concat(args); |
| 56 | return exec.execute(python, python_args, options); |
| 57 | } |
| 58 | assert(false, `Invalid ppci path ${compiler}`); |
| 59 | } else { |
| 60 | return super.exec(compiler, args, options); |
| 61 | } |
| 62 | } |
| 63 | } |
no test coverage detected