amol- commented on code in PR #12822:
URL: https://github.com/apache/arrow/pull/12822#discussion_r849277223


##########
ci/scripts/r_test.sh:
##########
@@ -90,11 +90,32 @@ SCRIPT="as_cran <- 
!identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
       message('Running minio for S3 tests (if build supports them)')
       minio_dir <- tempfile()
       dir.create(minio_dir)
-      pid <- sys::exec_background('minio', c('server', minio_dir))
-      on.exit(tools::pskill(pid))
+      pid_minio <- sys::exec_background('minio', c('server', minio_dir))
+      on.exit(tools::pskill(pid_minio), add = TRUE)
     }
   }
 
+  if(reticulate::py_module_available('pyarrow')){
+    old_pp <- Sys.getenv('PYTHONPATH', unset = NA)
+    Sys.setenv(PYTHONPATH = './inst')

Review Comment:
   I see. This is surely not very nice and requires manual cleanup that I guess 
can go wrong in case of crashes. One possible alternative is do perform the 
path addition in python itself:
   
   ```
    python -c "__import__(\"sys\").path.append(\"./inst\"); 
__import__(\"demo_flight_server\").DemoFlightServer(port=8089).serve()"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to