Skip to content

Conversation

@palaviv
Copy link
Contributor

@palaviv palaviv commented Jul 3, 2019

No description provided.

@palaviv palaviv mentioned this pull request Jul 3, 2019
import_frozen(vm, module_name)
} else if vm.stdlib_inits.borrow().contains_key(module_name) {
import_builtin(vm, module_name)
} else if cfg!(feature = "rustpython-compiler") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of this feature flag was to check if rustpython was built with bytecode compiler support. If not, the module cannot be loaded from disc. I think importlib.py has a similar mechanism. Please refer to the function imp_exec_builtin in imp.rs. Maybe the logic deleted here, can be replicated over there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the external_importers use compile now. So I changed init_importlib to not install them if there is not compiler.

@coolreader18 coolreader18 merged commit f8e8a12 into RustPython:master Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants