const path = require('path'); module.exports = { tags: async (tln) => [], options: async (tln) => [], env: async (tln, env) => { env.PYTHON_HOME = env.TLN_COMPONENT_HOME; env.PATH = [env.TLN_COMPONENT_HOME, env.PATH].join(path.delimiter); }, dotenvs: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'install', filter: '', desc: '', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { let build = []; if (tln.isLinux()) { build = [ `./configure --prefix=${home}`, 'make', 'make test' ]; } script.set(tln.getDownloadScript(tln, { linux: { name: `Python-${version}.tgz`, opts: { src: `Python-${version}`, flt: '*', dest: '.', rmv: `Python-${version}` }, url: `https://www.python.org/ftp/python/${version}/python-${version}.tgz` }, darwin: { name: ``, opts: null, url: `` }, win32: { name: `python-${version}-embed-amd64.zip`, opts: null, url: `https://www.python.org/ftp/python/${version}/python-${version}-embed-amd64.zip` } }).concat(build)); } } } ], components: async (tln) => require('./components.js') }