| 198 | |
| 199 | #ifdef __WXMSW__ |
| 200 | int InstallFromPipWindows(const std::string& pip_exec, const PythonPackageConfig& package){ |
| 201 | std::string args = " install " + package.name + "==" + package.version; |
| 202 | PROCESS_INFORMATION p_info; |
| 203 | STARTUPINFO s_info; |
| 204 | DWORD ReturnValue; |
| 205 | CA2T programpath(pip_exec.c_str()); |
| 206 | CA2T programargs(args.c_str()); |
| 207 | |
| 208 | memset(&s_info, 0, sizeof(s_info)); |
| 209 | memset(&p_info, 0, sizeof(p_info)); |
| 210 | s_info.cb = sizeof(s_info); |
| 211 | |
| 212 | if (CreateProcess(programpath, programargs, NULL, NULL, 0, CREATE_NO_WINDOW, NULL, NULL, &s_info, &p_info)) { |
| 213 | WaitForSingleObject(p_info.hProcess, INFINITE); |
| 214 | GetExitCodeProcess(p_info.hProcess, &ReturnValue); |
| 215 | CloseHandle(p_info.hProcess); |
| 216 | CloseHandle(p_info.hThread); |
| 217 | } |
| 218 | return ReturnValue; |
| 219 | } |
| 220 | #endif |
| 221 | |
| 222 | int InstallFromPip(const std::string& pip_exec, const PythonPackageConfig& package){ |
no outgoing calls
no test coverage detected