diff --git a/src/mx/_impl/mx_native.py b/src/mx/_impl/mx_native.py index 92aa630c..1008cc5f 100644 --- a/src/mx/_impl/mx_native.py +++ b/src/mx/_impl/mx_native.py @@ -683,8 +683,8 @@ def _ninja_deps(cls): # pylint: disable=no-self-argument except ImportError: dep = mx.library('NINJA_SYNTAX') deps.append(dep) - module_path = os.path.join(dep.get_path(False), f'ninja_syntax-{dep.version}') - mx_util.ensure_dir_exists(module_path) # otherwise, import machinery will ignore it + module_path = os.path.join(dep.get_path(True), f'ninja_syntax-{dep.version}') + # note that the import machinery needs this path to exist now, otherwise it will be ignored sys.path.append(module_path) return deps