$OpenBSD: patch-build_util_python2_action_py,v 1.1 2021/01/20 07:28:07 robert Exp $

Index: build/util/python2_action.py
--- build/util/python2_action.py.orig
+++ build/util/python2_action.py
@@ -5,6 +5,7 @@
 
 import subprocess
 import sys
+import os
 
 if sys.version_info.major == 2:
   # If we get here, we're already Python2, so just re-execute the
@@ -24,4 +25,6 @@ else:
   # a `python2.7` in path somewhere.
   exe = 'python2.7'
 
-sys.exit(subprocess.call([exe] + sys.argv[1:]))
+env = os.environ.copy()                                                        
+env["LD_LIBRARY_PATH"] = "${WRKSRC}/out/Release"
+sys.exit(subprocess.call([exe] + sys.argv[1:], env=env))
