@@ -284,7 +284,7 @@ void API_PLUGIN_MANAGER::InvokeAction( const wxString& aIdentifier )
284
284
if ( pythonHome )
285
285
env.env [wxS ( " VIRTUAL_ENV" )] = *pythonHome;
286
286
287
- long pid = manager.Execute ( pluginFile.GetFullPath (),
287
+ long pid = manager.Execute ( { pluginFile.GetFullPath () } ,
288
288
[]( int aRetVal, const wxString& aOutput, const wxString& aError )
289
289
{
290
290
wxLogTrace ( traceApi,
@@ -495,10 +495,14 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent )
495
495
env.env .erase ( " PYTHONPATH" );
496
496
}
497
497
#endif
498
-
499
- manager.Execute (
500
- wxString::Format ( wxS ( " -m venv --system-site-packages \" %s\" " ),
501
- job.env_path ),
498
+ std::vector<wxString> args = {
499
+ " -m" ,
500
+ " venv" ,
501
+ " --system-site-packages" ,
502
+ job.env_path
503
+ };
504
+
505
+ manager.Execute ( args,
502
506
[this ]( int aRetVal, const wxString& aOutput, const wxString& aError )
503
507
{
504
508
wxLogTrace ( traceApi,
@@ -553,10 +557,15 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent )
553
557
}
554
558
#endif
555
559
556
- wxString cmd = wxS ( " -m pip install --upgrade pip" );
557
- wxLogTrace ( traceApi, " Manager: calling python %s" , cmd );
560
+ std::vector<wxString> args = {
561
+ " -m" ,
562
+ " pip" ,
563
+ " install" ,
564
+ " --upgrade" ,
565
+ " pip"
566
+ };
558
567
559
- manager.Execute ( cmd ,
568
+ manager.Execute ( args ,
560
569
[this ]( int aRetVal, const wxString& aOutput, const wxString& aError )
561
570
{
562
571
wxLogTrace ( traceApi, wxString::Format ( " Manager: upgrade pip returned %d" ,
@@ -618,14 +627,22 @@ void API_PLUGIN_MANAGER::processNextJob( wxCommandEvent& aEvent )
618
627
if ( pythonHome )
619
628
env.env [wxS ( " VIRTUAL_ENV" )] = *pythonHome;
620
629
621
- wxString cmd = wxString::Format (
622
- wxS ( " -m pip install --no-input --isolated --only-binary :all: --require-virtualenv "
623
- " --exists-action i -r \" %s\" " ),
624
- reqs.GetFullPath () );
625
-
626
- wxLogTrace ( traceApi, " Manager: calling python %s" , cmd );
627
-
628
- manager.Execute ( cmd,
630
+ std::vector<wxString> args = {
631
+ " -m" ,
632
+ " pip" ,
633
+ " install" ,
634
+ " --no-input" ,
635
+ " --isolated" ,
636
+ " --only-binary" ,
637
+ " :all:" ,
638
+ " --require-virtualenv" ,
639
+ " --exists-action" ,
640
+ " i" ,
641
+ " -r" ,
642
+ reqs.GetFullPath ()
643
+ };
644
+
645
+ manager.Execute ( args,
629
646
[this , job]( int aRetVal, const wxString& aOutput, const wxString& aError )
630
647
{
631
648
if ( !aError.IsEmpty () )
0 commit comments