• Alexander Alekhin's avatar
    python: bindings loader package · ce6acd3e
    Alexander Alekhin authored
    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
    ce6acd3e
load_config_py3.py 262 Bytes
# 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)