ó
V¾÷Xc           @` so   d  Z  d d l m Z d d l m Z d d l m Z d d l Z d d l m Z d d l m	 Z	 d „  Z
 d S(	   s7   Utilities for loading op libraries.

@@load_op_library
i    (   t   absolute_import(   t   division(   t   print_functionN(   t   load_library(   t   resource_loaderc         C` sO   t  j d k rG t j |  ƒ }  t j |  ƒ } | sC t d |  ƒ ‚ | Sd Sd S(   sc  Loads a contrib op library from the given path.

  NOTE(mrry): On Windows, we currently assume that contrib op
  libraries are statically linked into the main TensorFlow Python
  extension DLL.

  Args:
    path: An absolute path to a shared object file.

  Returns:
    A Python module containing the Python wrappers for Ops defined in the
    plugin.
  t   nts   Could not load %sN(   t   ost   nameR   t   get_path_to_datafileR   t   load_op_libraryt   AssertionErrort   None(   t   patht   ret(    (    s`   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/contrib/util/loader.pyR	      s    (   t   __doc__t
   __future__R    R   R   R   t   tensorflow.python.frameworkR   t   tensorflow.python.platformR   R	   (    (    (    s`   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/contrib/util/loader.pyt   <module>   s   