File size: 769 Bytes
9375c9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (C) 2020  Davis E. King ([email protected])
# License: Boost Software License   See LICENSE.txt for the full license.

def add_lib_to_dll_path(path):
    """ On windows you must call os.add_dll_directory() to allow linking to external DLLs.  See
    https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew.  This function adds the folder
    containing path to the dll search path. 
    """
    try:
        import os
        os.add_dll_directory(os.path.join(os.path.dirname(path), '../../bin'))
    except (AttributeError,KeyError):
        pass

if '@DLIB_USE_CUDA@' == 'ON':
    add_lib_to_dll_path('@cudnn@')
    add_lib_to_dll_path('@CUDA_CUDART_LIBRARY@')

from _dlib_pybind11 import *
from _dlib_pybind11 import __version__, __time_compiled__