python: bindings loader package

Configures and loads OpenCV bindings extension including 3rdparty dependencies

Based on running Python specify:
- configure PYTHON_PATH (via "sys.path")
- configure LD_LIBRARY_PATH / PATH
This commit is contained in:
Alexander Alekhin
2018-10-28 13:32:27 +00:00
parent e5afa62c3d
commit ce6acd3ecd
13 changed files with 301 additions and 27 deletions
@@ -0,0 +1,9 @@
# flake8: noqa
import os
import sys
if sys.version_info[:2] >= (3, 0):
def exec_file_wrapper(fpath, g_vars, l_vars):
with open(fpath) as f:
code = compile(f.read(), os.path.basename(fpath), 'exec')
exec(code, g_vars, l_vars)