(installer: InstallPipMode, scope: Scope, vm: &VirtualMachine)
| 143 | } |
| 144 | |
| 145 | fn install_pip(installer: InstallPipMode, scope: Scope, vm: &VirtualMachine) -> PyResult<()> { |
| 146 | if !cfg!(feature = "ssl") { |
| 147 | return Err(vm.new_exception_msg( |
| 148 | vm.ctx.exceptions.system_error.to_owned(), |
| 149 | "install-pip requires rustpython be build with '--features=ssl'".into(), |
| 150 | )); |
| 151 | } |
| 152 | |
| 153 | match installer { |
| 154 | InstallPipMode::Ensurepip => vm.run_module("ensurepip"), |
| 155 | InstallPipMode::GetPip => get_pip(scope, vm), |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // pymain_run_file_obj in Modules/main.c |
| 160 | fn run_file(vm: &VirtualMachine, scope: Scope, path: &str) -> PyResult<()> { |
no test coverage detected