Skip to content

Commit bb30d0f

Browse files
committed
Don't install external imports if there is no compiler
1 parent 42d1713 commit bb30d0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/import.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn init_importlib(vm: &VirtualMachine, external: bool) -> PyResult {
1717
vm.invoke(install, vec![vm.sys_module.clone(), impmod])?;
1818
vm.import_func
1919
.replace(vm.get_attribute(importlib.clone(), "__import__")?);
20-
if external {
20+
if external && cfg!(feature = "rustpython-compiler") {
2121
let install_external =
2222
vm.get_attribute(importlib.clone(), "_install_external_importers")?;
2323
vm.invoke(install_external, vec![])?;

0 commit comments

Comments
 (0)