ó
ąxTc           @   s½   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d Z d   Z d e j j	 j
 f d     YZ d e f d     YZ d	 e f d
     YZ d   Z e d k r¹ e   n  d S(   i’’’’(   t   divisionNs  Synopsis

libtbx.epydoc [options]

Description

Generate the epydoc documentation specified by the given configuration file.
Any option understood by epydoc may be passed to this script.
If the configuration file is not specified, the file epydoc.conf in the current directory is used.

Requirements

Epydoc 3.0 and docutils.

Instructions for documentation writers

When a pure Python class A uses the Boost.Python wrapping of a C++ class B,
the docstring of A should feature a link to the doxygen-generated
documentation of B. That link shall be written as e.g.
  :doxyclass:`scitbx::lbfgs::drop_convergence_test`
and will give
<a href="../c_plus_plus/classscitbx_1_1lbfgs_1_1drop__convergence__test.html">
class scitbx::lbfgs::drop_convergence_test</a>
The other magic keyword is "doxystruct" for struct instead of class.

This relies on an essential requirement on the part of the C++ documentation writers: the C++ documentation root directory and the Python documentation
root directory shall be in the same directory on the server.
c           C   s   t  GHt d  d  S(   Ni   (   t	   help_textt   exit(    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyt   help$   s    t   DoxygenUrlGeneratorc           B   s   e  Z d    Z RS(   c         C   s5   | j  d d  j  d d  } d |  j | f } | S(   Nt   _t   __s   ::t   _1_1s   ../c_plus_plus/%s%s.html(   t   replacet   what_is_documented(   t   selft   namet   url(    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyt   get_url+   s    (   t   __name__t
   __module__R   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyR   )   s   t   DoxygenClassUrlGeneratorc           B   s   e  Z d  Z RS(   t   class(   R   R   R	   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyR   1   s   t   DoxygenStructUrlGeneratorc           B   s   e  Z d  Z RS(   t   struct(   R   R   R	   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyR   4   s   c          C   s¹   t  j j j d t    t  j j j d d t t  j j j d t    t  j j j d d t d d  l }  d |  j d k r |  j j	 d  n  t  j
 j   } t  j
 j |  d  S(   Nt	   doxyclasst   problematict
   doxystructi’’’’s   --conf=i   s   --conf=epydoc.conf(   t   epydoct	   docwritert   xlinkt   register_apiR   t   create_api_rolet   Falset   syst   argvt   appendt   clit   parse_argumentst   main(   R   t   options(    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyt   run8   s    t   __main__(   t
   __future__R    R   t   epydoc.docwritert   epydoc.docwriter.xlinkt
   epydoc.cliR   R   R   R   t   UrlGeneratorR   R   R   R$   R   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/command_line/epydoc_run.pyt   <module>   s   		