File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
taskvine/src/bindings/python3/ndcctools/taskvine Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ def _copy_run_in_env(env_dir):
108108 f .write (
109109 'env_dir=$(dirname $( cd -- "$( dirname -- "$0" )" > /dev/null 2>&1 && pwd ))\n '
110110 )
111+ f .write ('export PONCHO_PREFIX="${env_dir}"\n ' )
111112 f .write ('exec "${env_dir}"/bin/poncho_package_run -e ${env_dir} "$@"\n ' )
112113 os .chmod (f"{ env_dir } /env/bin/run_in_env" , 0o755 )
113114
Original file line number Diff line number Diff line change 1515
1616import copy
1717import os
18- import sys
1918import textwrap
2019import uuid
2120import cloudpickle
21+ import sys
2222
2323
2424##
@@ -1002,11 +1002,8 @@ def output(self):
10021002 def disable_output_serialization (self ):
10031003 self ._serialize_output = False
10041004
1005- def _python_function_command (self , remote_env_dir = None ):
1006- if remote_env_dir :
1007- py_exec = "python"
1008- else :
1009- py_exec = f"python{ sys .version_info [0 ]} "
1005+ def _python_function_command (self ):
1006+ py_exec = "${PONCHO_PREFIX:+${PONCHO_PREFIX}/bin/}" + f"python{ sys .version_info [0 ]} "
10101007
10111008 command = f"{ py_exec } w_{ self ._id } f_{ self ._id } a_{ self ._id } o_{ self ._id } "
10121009 return command
You can’t perform that action at this time.
0 commit comments