๓
Uพ๗Xc        -   @` s9  d  d l  m Z d  d l  m Z d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m	 Z	 m
 Z
 m Z d  d l m Z d  d l m Z d Z d	 d
 d g Z d Z d e j k re j j d  Z e j e d Z e j j d  e j j e  n  e j j d k r.e j d  n e j d  e j d  d g Z d g Z d e f d     YZ d e f d     YZ d e f d     YZ  d   Z! g  e! d d  D] Z" d e" k rตd e" ^ qตZ# e j$ d  k r๏d! Z% n d" Z% e& e! d# d$   e& e! d# d%   e& e! d# d&   e& e! d d'   e& e! d d(   Z' e
 d) e d* e j( d+ d,  d- d. d/ d, d0 d1 d2 d3 d4 d5 d6 e	   d7 i e d8 6d9 e' d: e d; e e d< e) d= i e% d> d? d@ dA dB g e# d 6dC e* dD e dE i e  dF 6e dG 6dH dI dJ dK dL dM dN dO dP dQ g	 dR dS dT dU  d S(V   i    (   t   absolute_import(   t   division(   t   print_functionN(   t   find_packagest   setupt   Command(   t   install(   t   Distributions   1.0.1s   numpy >= 1.11.0s   six >= 1.10.0s   protobuf >= 3.1.0t
   tensorflows   --project_namei   i   s   wheel >= 0.26t   wheels   mock >= 2.0.0s5   tensorboard = tensorflow.tensorboard.tensorboard:mains   scipy >= 0.15.1t   BinaryDistributionc           B` s   e  Z d    Z RS(   c         C` s   t  S(   N(   t   True(   t   self(    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   has_ext_modulesB   s    (   t   __name__t
   __module__R   (    (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyR
   A   s   t   InstallCommandc           B` s   e  Z d  Z d   Z RS(   s&   Override the dir where the headers go.c         C` s1   t  j |   } t j j |  j d d  |  _ | S(   NR   t   include(   t   InstallCommandBaset   finalize_optionst   ost   patht   joint   install_purelibt   install_headers(   R   t   ret(    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyR   I   s    (   R   R   t   __doc__R   (    (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyR   F   s   t   InstallHeadersc           B` s_   e  Z d  Z d Z d d g Z d g Z d   Z d	   Z d
   Z d   Z	 d   Z
 d   Z RS(   s็   Override how headers are copied.

  The install_headers that comes with setuptools copies all files to
  the same directory. But we need the files to be in a specific directory
  hierarchy for -I <include_dir> to work correctly.
  s   install C/C++ header filess   install-dir=t   ds$   directory to install header files tot   forcet   fs-   force installation (overwrite existing files)c         C` s   d  |  _ d |  _ g  |  _ d  S(   Ni    (   t   Nonet   install_dirR   t   outfiles(   R   (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   initialize_optionsa   s    		c         C` s   |  j  d d d  d  S(   NR   R   R    R   (   s   install_headerss   install_dir(   s   forces   force(   t   set_undefined_options(   R   (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyR   f   s    	c         C` sพ   t  j j |  j t  j j |   } t j d d |  } d | k r | j d d  } t  j j |  sy |  j	 |  n  |  j
 | |  n  t  j j |  sฎ |  j	 |  n  |  j
 | |  S(   Ns   /google/protobuf/srct    s   external/eigen_archive/s   external/eigen_archive(   R   R   R   R    t   dirnamet   ret   subt   replacet   existst   mkpatht	   copy_file(   R   t   headerR    t	   extra_dir(    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   mkdir_and_copy_filek   s    $c         C` s`   |  j  j } | s d  S|  j |  j  x3 | D]+ } |  j |  \ } } |  j j |  q- Wd  S(   N(   t   distributiont   headersR*   R    R.   R!   t   append(   R   t   hdrsR,   t   outt   _(    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   run   s    c         C` s   |  j  j p g  S(   N(   R/   R0   (   R   (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt
   get_inputs   s    c         C` s   |  j  S(   N(   R!   (   R   (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   get_outputs   s    (   s   install-dir=R   s$   directory to install header files to(   s   forceR   s-   force installation (overwrite existing files)(   R   R   R   t   descriptiont   user_optionst   boolean_optionsR"   R   R.   R5   R6   R7   (    (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyR   P   s     						
	c         c` sX   xQ t  j |  D]@ \ } } } x. t j | |   D] } t  j j | |  Vq2 Wq Wd S(   s5   Return all the files matching pattern below root dir.N(   R   t   walkt   fnmatcht   filterR   R   (   t   patternt   rootR   R4   t   filest   filename(    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt
   find_files   s    t   *t   externals   .pys   ../t   nts   python/_pywrap_tensorflow.pyds   python/_pywrap_tensorflow.sos   *.hs   tensorflow/cores   tensorflow/stream_executors   google/protobuf/srcs   third_party/eigen3s   external/eigen_archivet   namet   versiont   -R$   R8   s!   TensorFlow helps the tensors flowt   long_descriptiont   urls   http://tensorflow.org/t   authors   Google Inc.t   author_emails   opensource@google.comt   packagest   entry_pointst   console_scriptsR0   t   install_requirest   tests_requiret   include_package_datat   package_datas(   tensorboard/dist/bazel-html-imports.htmls   tensorboard/dist/index.htmls$   tensorboard/dist/tf-tensorboard.htmls   tensorboard/lib/css/global.csss   tensorboard/TAGt   zip_safet	   distclasst   cmdclassR   R   t   classifierss   Development Status :: 4 - Betas   Intended Audience :: Developerss   Intended Audience :: Educations%   Intended Audience :: Science/Researchs2   License :: OSI Approved :: Apache Software Licenses%   Programming Language :: Python :: 2.7s.   Topic :: Scientific/Engineering :: Mathematicss<   Topic :: Software Development :: Libraries :: Python Moduless*   Topic :: Software Development :: Librariest   licenses
   Apache 2.0t   keywordss"   tensorflow tensor machine learning(+   t
   __future__R    R   R   R<   R   R&   t   syst
   setuptoolsR   R   R   t   setuptools.command.installR   R   t   setuptools.distR   t   _VERSIONt   REQUIRED_PACKAGESt   project_namet   argvt   indext   project_name_idxt   removet   popt   version_infot   majorR1   t   CONSOLE_SCRIPTSt   TEST_PACKAGESR
   R   R   RB   t   xt   matchesRF   t   EXTENSION_NAMEt   listR0   R(   R   t   False(    (    (    sd   /tmp/pip-build-h1VYrz/tensorflow/tensorflow-1.0.1.data/purelib/tensorflow/tools/pip_package/setup.pyt   <module>   s   			
A	2	K	


	