aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/python.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/python.js')
-rw-r--r--lib/compilers/python.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/compilers/python.js b/lib/compilers/python.js
index 843024552..4afd6acd5 100644
--- a/lib/compilers/python.js
+++ b/lib/compilers/python.js
@@ -22,11 +22,12 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-const BaseCompiler = require('../base-compiler'),
- argumentParsers = require('./argument-parsers'),
- path = require('path');
+import { BaseCompiler } from '../base-compiler';
+import { resolvePathFromAppRoot } from '../utils';
-class PythonCompiler extends BaseCompiler {
+import { BaseParser } from './argument-parsers';
+
+export class PythonCompiler extends BaseCompiler {
static get key() { return 'python'; }
constructor(compilerInfo, env) {
@@ -68,7 +69,7 @@ class PythonCompiler extends BaseCompiler {
getDisasmScriptPath() {
const script = this.compilerProps('disasmScript');
- return script || path.resolve(__dirname, '..', '..', 'etc', 'scripts', 'dis_all.py');
+ return script || resolvePathFromAppRoot('etc', 'scripts', 'dis_all.py');
}
optionsForFilter(filters, outputFilename) {
@@ -80,8 +81,6 @@ class PythonCompiler extends BaseCompiler {
}
getArgumentParser() {
- return argumentParsers.Base;
+ return BaseParser;
}
}
-
-module.exports = PythonCompiler;