diff main.py @ 3:d2be2eb8350f draft

"planemo upload commit b2a00d9c24285fef0fb131d1832ecf4c337e5038-dirty"
author rhohensinner
date Mon, 19 Jul 2021 13:11:45 +0000
parents 0641ea2f75b1
children
line wrap: on
line diff
--- a/main.py	Fri Jul 02 09:40:25 2021 +0000
+++ b/main.py	Mon Jul 19 13:11:45 2021 +0000
@@ -4,7 +4,6 @@
 
 # general imports
 import os, sys, json
-import irods_upload
 
 from shutil import copyfile
 from datetime import datetime
@@ -24,6 +23,7 @@
 session_success = False
 selection_success = False
 iRODSCredentials = {"host": "", "port": "", "user": "", "pw": "", "zone": ""}
+python_path = []
 
 
 ########################################################################################################################
@@ -440,6 +440,7 @@
         arg2 = params["galaxy_datatypes"]
         arg3 = os.path.abspath(fileParams.name)
         arg4 = params["job_id"] + ":" + params["out_dir"] + ":" + params["out_file"]
+        arg5 = params["galaxy_root"] + "/lib/galaxy"
 
         # copy sample registry.xml to working directory
         copyfile(reg_file, params["galaxy_datatypes"])
@@ -460,7 +461,9 @@
             if upload_file != "":
                 break
                 
-        os.system("python " +  upload_file + " " + arg1 + " " + arg2 + " " + arg3 + " " + arg4)
+        global python_path
+        python_path = sys.path
+        os.system(params["galaxy_root"] + "/.venv/bin/python " +  upload_file + " " + arg1 + " " + arg2 + " " + arg3 + " " + arg4)
     # close connection
     session.cleanup()
 # -------------------------------------------------------------------------------------------------------------------- #