ó
V™xTc           @   sd   d  d l  m Z d  d l Z d  d l Z e j Z g  d „ Z e d k r` e d e j d ƒ n  d S(   iÿÿÿÿ(   t   divisionNc            sH  t  |  ƒ d k s t ‚ d d  l ‰  ˆ  j j d d d d d t j ƒ } d d  l } | j j	 d g  d	 d
 g D] } t j
 | | ƒ ^ qm ƒ } d } t d d g ƒ } t d d d d d g ƒ } t d g ƒ } d d  l } | j j	 d | d | d t d t d t d | j | ƒ d | ƒ }	 | j j	 d | d | d t d t d t d | ƒ }
 d |
 d <| j j	 d | d | d t d t d | j | ƒ ƒ } |
 d | d <‡  f d †  } | d d ƒ } t t j
 | d ƒ d ƒ d j
 |	 ƒ IJ| d d  ƒ } t t j
 | d! ƒ d ƒ d j
 |
 ƒ IJt t j
 | d" ƒ d ƒ d j
 | ƒ IJd  S(#   Ni    iÿÿÿÿt   module_namet   scitbxt   patht   lbfgst   testt
   file_namess   sdrive.fs   lbfgs.fs   scitbx::lbfgs_femt   blockdata_lb2t   lb1t   daxpyt   ddott   mcstept   mcsrcht   one_passt
   all_fprocst	   namespacet   fem_do_safet   suppress_programt   suppress_commont   suppress_functionst   suppress_function_definitionss   #include <scitbx/lbfgs_fem.hpp>c            sM   ˆ  j  j d |  ƒ } t j | ƒ sI t j | ƒ t j | ƒ sI t ‚ n  | S(   NR   (   t   envt   under_buildt   opt   isdirt   ost   makedirst   AssertionError(   R   t   result(   t   libtbx(    sP   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/source_generators/lbfgs_fem.pyt   make_target_dir*   s
    s   include/scitbxs   lbfgs_fem.hppt   ws   
s   scitbx/lbfgss   lbfgs_fem.cpps   sdrive_fem.cpp(   t   lenR   t   libtbx.load_envR   t
   under_distR   R   t
   fable.readt   readt   processt   joint   sett
   fable.coutt   coutt   Falset   Truet   uniont   open(   t   argst   src_dirt   fablet   fR   R   t   functions_publict   functions_detailt   functions_programt   functions_hppt   functions_cppt
   sdrive_cppR   t
   target_dir(    (   R   sP   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/source_generators/lbfgs_fem.pyt   run   sX    .		
t   __main__R.   i   (	   t
   __future__R    t   sysR   R   R   R9   t   __name__t   argv(    (    (    sP   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/source_generators/lbfgs_fem.pyt   <module>   s
   	4