
    Sh                     8    d dl Z d dlZd dlZdZ	 	 	 	 ddZd ZdS )	    Nz{"""DO NOT EDIT.

This file was autogenerated. Do not edit it by hand,
since your modifications would be overwritten.
"""


srcF c                     |rt          d  d  d| d           t          j                                       st	          d  d          t          j                            t          j                             |                    st	          d  d| d           fd|D             }g }t          j        t          j                             |                    D ]\  }}}||v r|                                 |D ]}	|	dk    r<|                    d                    |	                    d                               D|	
                    d	          r`|	
                    d
          sK|	dd         }
|                    d                    |	                    d                    dz   |
z              t          j                            dt          j                               g }|D ]-}t          j        |d          }|                    |           .|rt          d           t!                      }|D ]}t#          |          D ]}t%          ||          }t'          |d          s#|j        t+          |          k    r<t-           fdt/          |j                  D                       sj|                    |           i }|D ]C}|rt          d|j         d           t/          |j                  D ]}|	                    d          }|d          k    r||d         |g|dd         z   }|d         }t          j        j        |dd          }||vrg ||<   ||                             ||d           t7          dt9          |dd                             D ]e}t          j        j        |d|          }||vrg ||<   ||                             ||         d                    |d|                   d           fE|rt          d           |                                D ]\  }}t          j        |d           g }t!                      }|D ]}d|v r9|d         }|d         }|                    d|j         d|j         d|            ?d |v rq|d          |vrg|d          }|                    dd                    |	                    d                     d| d|            |                    |d                     t          j                            |d          }|rt          d!|            tA          |          }tC          |d"          5 }tD          d#                    |          z   d#z   }|#                    |           ddd           n# 1 swxY w Y   dS )$a  Writes out API export `__init__.py` files.

    Given a codebase structured as such:

    ```
    package/
    ...src/
    ......__init__.py
    ......(Python files that use e.g. `@export_api(package="package", export_path="package.x.y.Z")`)
    ```

    this script generates `__init__.py` files within `package/`
    to export the public API described by the `@api_export` calls.

    Important notes:

    * Any existing `__init__.py` files in `package/` but outside of
        `package/code_directory/` may be overwritten.
    * This script must be run in an environment that includes
        all dependencies used by `package`. Make sure to install
        them before running the script.
    zGenerating files for package 'z' from sources found in '/z'.zNo directory named 'c                 P    g | ]"}t           j                            |          #S r   )ospathjoin).0dpackages     T/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/namex/generate.py
<listcomp>z&generate_api_files.<locals>.<listcomp>7   s)    QQQ27<<33QQQ    z__init__.py.z.pyz_test.pyNr   )r   z$Compiling list of symbols to export._api_export_pathc                 @    g | ]}|                     d z             S )r   )
startswith)r   r	   r   s     r   r   z&generate_api_files.<locals>.<listcomp>^   s9        OOGcM22  r   z...processing symbol ''   )symbolexport_name)modulelocationzWriting out API files.T)exist_okr   r   zfrom z import z as r   z...writing w
)$printr   r	   exists
ValueErrorr
   walkclearappendsplitendswithsysinsertgetcwd	importlibimport_modulesetdirgetattrhasattr_api_export_symbol_ididallto_listr   add__name__rangelenitemsmakedirs
__module__sortedopenINIT_FILE_HEADERwrite) r   code_directoryverbosetarget_directoryexclude_directoriescodebase_walk_entry_pointsrootdirsfilesfnamemodule_namemodulesentry_pointmodall_symbolsr   namer   init_files_contentexport_pathexport_modulesr   parent_pathiintermediate_pathr	   contentsinit_file_linesmodules_includedsymbol_metadata	init_pathfs    `                               r   generate_api_filesr[      s$   :  
CW C C&-C C0>C C C	
 	
 	

 7>>'"" =;;;;<<<7>>"',,w??@@ NLLL.LLLMMMQQQQ=PQQQ "$WRW\\'>%J%JKK  dE&&&JJLLL 	 	E%%*11#((4::c??2K2KLLLL&& u~~j/I/I #CRCj*11HHTZZ__--3kA  	 HOOAry{{###G1  %k3???s 64555 %%K $ $KK 	$ 	$DVT**F6#566 +r&zz99     '(? @ @     OOF####	$$    	?=6?===>>>"6#:;; 	 	K(..s33Na G++0@0L"0"35E!FXYXZXZI[![(,K',ss(;<K"44424";/{+22!+>>   1c.""56677 	 	$&GL.!2D$E!$,>>><>&'89"#45<<"0"3$'HH^BQB-?$@$@    			,  (&''' -2244  h
D4((((55' 	D 	DO?**(2&}5&&RF-RRvRRDRR    _,,"8,4DDD,X6F#**WC 9 9WW6WWvWW   %(()BCCCGLL}55	 	-+	++,,, 11)S!! 	Q'$))O*D*DDtKHGGH	 	 	 	 	 	 	 	 	 	 	 	 	 	 	/ s   :6V<<W 	W 	c                     t          | t          t          f          rt          |           S t          | t                    r| gS g S )N)
isinstancelisttuplestr)xs    r   r4   r4      sA    !dE]## Aww	As		 s
Ir   )r   FNr   )r   r(   r+   r>   r[   r4   r   r   r   <module>rb      sk    				 



      P P P Pf    r   