File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
pulsar-functions/instance/src/main/python Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,15 @@ def main():
207
207
zpfile .extractall (os .path .dirname (str (args .py )))
208
208
basename = os .path .basename (os .path .splitext (str (args .py ))[0 ])
209
209
210
+ requirements_file = os .path .join (os .path .dirname (str (args .py )), basename , "requirements.txt" )
211
+ if os .path .isfile (requirements_file ):
212
+ cmd = "pip install -r %s" % requirements_file
213
+ Log .debug ("Install python dependencies via cmd: %s" % cmd )
214
+ retval = os .system (cmd )
215
+ if retval != 0 :
216
+ print ("Could not install user depedencies specified by the requirements.txt file" )
217
+ sys .exit (1 )
218
+
210
219
deps_dir = os .path .join (os .path .dirname (str (args .py )), basename , "deps" )
211
220
212
221
if os .path .isdir (deps_dir ) and os .listdir (deps_dir ):
You can’t perform that action at this time.
0 commit comments