Skip to content

Commit ae6ae2b

Browse files
Merge pull request #231 from jasongraffius/fix-paths
embossc: Revert path manipulation
2 parents 49c186a + e7b26df commit ae6ae2b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

embossc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ import argparse
2020
import os
2121
import sys
2222

23-
from compiler.back_end.cpp import emboss_codegen_cpp, header_generator
24-
from compiler.front_end import emboss_front_end
25-
2623

2724
def _parse_args(argv):
2825
parser = argparse.ArgumentParser(description="Emboss compiler")
@@ -72,6 +69,15 @@ def _parse_args(argv):
7269

7370
def main(argv):
7471
flags = _parse_args(argv)
72+
base_path = os.path.dirname(__file__) or "."
73+
sys.path.append(base_path)
74+
75+
from compiler.back_end.cpp import ( # pylint:disable=import-outside-toplevel
76+
emboss_codegen_cpp, header_generator
77+
)
78+
from compiler.front_end import ( # pylint:disable=import-outside-toplevel
79+
emboss_front_end
80+
)
7581

7682
ir, _, errors = emboss_front_end.parse_and_log_errors(
7783
flags.input_file[0], flags.import_dirs, flags.color_output

0 commit comments

Comments
 (0)