|
@ -284,7 +284,7 @@ void API_PLUGIN_MANAGER::InvokeAction( const wxString& aIdentifier ) |
|
|
if( pythonHome ) |
|
|
if( pythonHome ) |
|
|
env.env[wxS( "VIRTUAL_ENV" )] = *pythonHome; |
|
|
env.env[wxS( "VIRTUAL_ENV" )] = *pythonHome; |
|
|
|
|
|
|
|
|
long pid = manager.Execute( pluginFile.GetFullPath(), |
|
|
|
|
|
|
|
|
long pid = manager.Execute( { pluginFile.GetFullPath() }, |
|
|
[]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
[]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
{ |
|
|
{ |
|
|
wxLogTrace( traceApi, |
|
|
wxLogTrace( traceApi, |
|
@ -495,10 +495,14 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent ) |
|
|
env.env.erase( "PYTHONPATH" ); |
|
|
env.env.erase( "PYTHONPATH" ); |
|
|
} |
|
|
} |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
manager.Execute( |
|
|
|
|
|
wxString::Format( wxS( "-m venv --system-site-packages \"%s\"" ), |
|
|
|
|
|
job.env_path ), |
|
|
|
|
|
|
|
|
std::vector<wxString> args = { |
|
|
|
|
|
"-m", |
|
|
|
|
|
"venv", |
|
|
|
|
|
"--system-site-packages", |
|
|
|
|
|
job.env_path |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
manager.Execute( args, |
|
|
[this]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
[this]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
{ |
|
|
{ |
|
|
wxLogTrace( traceApi, |
|
|
wxLogTrace( traceApi, |
|
@ -553,10 +557,15 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent ) |
|
|
} |
|
|
} |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
wxString cmd = wxS( "-m pip install --upgrade pip" ); |
|
|
|
|
|
wxLogTrace( traceApi, "Manager: calling python %s", cmd ); |
|
|
|
|
|
|
|
|
std::vector<wxString> args = { |
|
|
|
|
|
"-m", |
|
|
|
|
|
"pip", |
|
|
|
|
|
"install", |
|
|
|
|
|
"--upgrade", |
|
|
|
|
|
"pip" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
manager.Execute( cmd, |
|
|
|
|
|
|
|
|
manager.Execute( args, |
|
|
[this]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
[this]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
{ |
|
|
{ |
|
|
wxLogTrace( traceApi, wxString::Format( "Manager: upgrade pip returned %d", |
|
|
wxLogTrace( traceApi, wxString::Format( "Manager: upgrade pip returned %d", |
|
@ -618,14 +627,22 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent ) |
|
|
if( pythonHome ) |
|
|
if( pythonHome ) |
|
|
env.env[wxS( "VIRTUAL_ENV" )] = *pythonHome; |
|
|
env.env[wxS( "VIRTUAL_ENV" )] = *pythonHome; |
|
|
|
|
|
|
|
|
wxString cmd = wxString::Format( |
|
|
|
|
|
wxS( "-m pip install --no-input --isolated --only-binary :all: --require-virtualenv " |
|
|
|
|
|
"--exists-action i -r \"%s\"" ), |
|
|
|
|
|
reqs.GetFullPath() ); |
|
|
|
|
|
|
|
|
|
|
|
wxLogTrace( traceApi, "Manager: calling python %s", cmd ); |
|
|
|
|
|
|
|
|
|
|
|
manager.Execute( cmd, |
|
|
|
|
|
|
|
|
std::vector<wxString> args = { |
|
|
|
|
|
"-m", |
|
|
|
|
|
"pip", |
|
|
|
|
|
"install", |
|
|
|
|
|
"--no-input", |
|
|
|
|
|
"--isolated", |
|
|
|
|
|
"--only-binary", |
|
|
|
|
|
":all:", |
|
|
|
|
|
"--require-virtualenv", |
|
|
|
|
|
"--exists-action", |
|
|
|
|
|
"i", |
|
|
|
|
|
"-r", |
|
|
|
|
|
reqs.GetFullPath() |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
manager.Execute( args, |
|
|
[this, job]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
[this, job]( int aRetVal, const wxString& aOutput, const wxString& aError ) |
|
|
{ |
|
|
{ |
|
|
if( !aError.IsEmpty() ) |
|
|
if( !aError.IsEmpty() ) |
|
|