2017-03-29 13:44:02 +00:00
|
|
|
## @package extension_loader
|
|
|
|
|
# Module caffe2.python.extension_loader
|
2016-07-21 18:26:41 +00:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
from __future__ import division
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
import contextlib
|
|
|
|
|
|
|
|
|
|
@contextlib.contextmanager
|
|
|
|
|
def DlopenGuard():
|
2016-10-07 20:08:53 +00:00
|
|
|
# This is a stub for setting up special tricks around python extensions
|
|
|
|
|
# loading. For example, it might do
|
|
|
|
|
# sys.setdlopenflags(DLFCN.RTLD_GLOBAL | DLFCN.RTLD_NOW)
|
|
|
|
|
# which might be required in some setups of python
|
2016-07-21 18:26:41 +00:00
|
|
|
yield
|