Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/Tools/freeze/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/Tools/freeze/__pycache__/freeze.cpython-34.pyo

�
e f�B�@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
dd�Zdd�Ze�dS)a�
Freeze a Python script into a binary.

usage: freeze [options...] script [module]...

Options:
-p prefix:    This is the prefix used when you ran ``make install''
              in the Python build directory.
              (If you never ran this, freeze won't work.)
              The default is whatever sys.prefix evaluates to.
              It can also be the top directory of the Python source
              tree; then -P must point to the build tree.

-P exec_prefix: Like -p but this is the 'exec_prefix', used to
                install objects etc.  The default is whatever sys.exec_prefix
                evaluates to, or the -p argument if given.
                If -p points to the Python source tree, -P must point
                to the build tree, if different.

-e extension: A directory containing additional .o files that
              may be used to resolve modules.  This directory
              should also have a Setup file describing the .o files.
              On Windows, the name of a .INI file describing one
              or more extensions is passed.
              More than one -e option may be given.

-o dir:       Directory where the output files are created; default '.'.

-m:           Additional arguments are module names instead of filenames.

-a package=dir: Additional directories to be added to the package's
                __path__.  Used to simulate directories added by the
                package at runtime (eg, by OpenGL and win32com).
                More than one -a option may be given for each package.

-l file:      Pass the file to the linker (windows only)

-d:           Debugging mode for the module finder.

-q:           Make the module finder totally quiet.

-h:           Print this help message.

-x module     Exclude the specified module. It will still be imported
              by the frozen binary if it exists on the host system.

-X module     Like -x, except the module can never be imported by
              the frozen binary.

-E:           Freeze will fail if any modules can't be found (that
              were not excluded using -x or -X).

-i filename:  Include a file with additional command line options.  Used
              to prevent command lines growing beyond the capabilities of
              the shell/OS.  All arguments specified in filename
              are read and the -i option replaced with the parsed
              params (note - quoting args in this file is NOT supported)

-s subsystem: Specify the subsystem (For Windows only.);
              'console' (default), 'windows', 'service' or 'com_dll'

-w:           Toggle Windows (NT or 95) behavior.
              (For debugging only -- on a win32 platform, win32 behavior
              is automatic.)

-r prefix=f:  Replace path prefix.
              Replace prefix with f in the source path references
              contained in the resulting binary.

Arguments:

script:       The Python script to be executed by the resulting binary.

module ...:   Additional Python modules (referenced by pathname)
              that will be included in the resulting binary.  These
              may be .py or .pyc files.  If -m is specified, these are
              module names that are search in the path instead.

NOTES:

In order to use freeze successfully, you must have built Python and
installed it ("make install").

The script should not use modules provided only as shared libraries;
if it does, the resulting binary is not self-contained.
�NcQGCsMd}d}g}g}g}tjdd�}d}d}d}tjdd�dk}	g}
d}|	r�|dddd	d
ddd
g}n|dd�}d}
d}d}d}d}d}x�|ttj�dkr�tj|dkr�y'ttj|d�j�j�}WnDtk
rc}z$t	dtj|d|f�WYdd}~XnX|tj||d�<|t|�d}n|d}q�Wy)t
j
tjdd�d�\}}Wn<t
jk
r}zt	dt|��WYdd}~XnXx�|D]�\}}|dkr5t
t�dS|dkrN|d}n|dkrj|j|�n|dkrd}n|dkr�|}n|dkr�|}n|dkr�|}n|dkr�d}n|d kr�|	}	n|d!kr|	st	d"�n|}n|d#kr-|j|�n|d$krV|j|�|j|�n|d%krkd}n|d&kr�|j|�n|d'kr�tj|jd(d��n|d)kr|jd(d�\}}|
j||f�qqWg}x*d^D]"}||kr�|j|�q�q�W|sA|r5|}qAtj}n|sStj}ntjjtjj|d.d/��}tjdd�}|tj} |	r�d0}!n|r=t
d1�|}"tjj|d2�}#|}$tjj|d3d4�}%tjj|d.d5�}&tjj|d�}'|	r�tjj|d6�}(q�n�tjj|d7d8|d9| �}"tjj|d:d8| �}#tjj|d:d8| �}$tjj|"d4�}%tjj|"d5�}&tjj|"d�}'tjj|"d;�}(g})g}*d<|#d<|$g}+|||"|#g},|	s1|,|},nxT|,D]L}-tjj|-�sat	d=|-�ntjj|-�s8t	d>|-�q8q8W|	r�|)|}.n|%|'g|)}.xT|)D]L}/tjj|/�s�t	d?|/�ntjj|/�s�t	d@|/�q�q�W|	swxl|D]a}-tjj|-dA�}0tjj|0�sMt	d?|0�ntjj|0�st	d@|0�qqWn|s�t	dB�nxn|D]f}1|1dkr�Pn|r�Pntjj|1�s�t	dC|1�ntjj|1�s�t	d@|1�q�q�W|d}2|dd�}3tjj|2�}4tjj|4�\}4}5|4rg|4|2krZ|4}qg|4dD}n|
}6|}7|}8|r�tjj|�r�ytj|�t
dE|�Wq�tk
r�}zt	dF|t|�f�WYdd}~Xq�Xnd}4|r�	tjj|d�}4tjj||
�}
tjj||�}tjj||�}tjj||�}|	r�	tjj||!�}!q�	nd}9d}:|	r�	ddl};y|;j |�\}9}:Wq�	t!k
r�	}zt	|�WYdd}~Xq�	Xntjj"|2�}-|-|d<tj#||||
�}<|	rX
|dGkrX
|<j$dH�}=dI|=_%nx|D]}=|<j&|=�q_
Wx�|3D]z}=|=dkr�
d}q}
n|r�
|=d_d�dJkr�
|<j&|=dd`�ddKg�q�
|<j&|=�q}
|<j'|=�q}
W|<j(dL|<j(dM<|:r%|<j)|2�n
|<j'|2�|dkrR|<j*�t
�n|<j(}>|r�|<j+�}?|?r�tj,dN|?�q�nt-j-|4|>||9|�}.g}@g}At.|>j/��}BxK|BD]C}=|>|=j0r�q�n|>|=j%s|@j|=�q�|Aj|=�q�Wg}Cg}D|As0|	r�|@r�|	s�t1j1|A|@|�\}C}Ex||ED]/}=|=|AkrY|Aj2|=�|@j|=�qYqYWq�ddl3}F|Fj1|A||�}Dx!|DD]}=|Aj2|=j4�q�Wn|Ar�tj5j6dOdPj|A��n|	r�
ddl};ddl3}F|Fj7|!|D�|&tjj|
�|(tjj|!�g|.}G|Fj8dQ|G�}H|Dj|H�t|dR�}Iz)|;j9|It:�|Dtjj|��Wd|Ij;�XdS|@j<�t|%�}Jt=j|dR�}Izt>j>|J|I|@�Wd|Ij;�X|Jj;�dSg}K|*|+}Ltjj|"dT�g}Mi}Ntjj|'�r�t?j@|'�}Ox|OD]}P|O|P|N|P<qoWndPj|K�|NdU<dPj|L�|NdV<|7|6g|.|)|C|MdWdXdYg}.t=j|dR�}Izt9j9|I|N|.|8�Wd|Ij;�X|r<t
dZ|d[dP�t
d\|8�n
t
d]|8�dS)aNr����winZdosZdospathZmacZmacpathZmacfsZMACFS�posixZcezfrozen.czconfig.cza.out�MakefileZconsolez-iz@File name '%s' specified with the -i option can not be read - %s�zr:a:dEe:hmo:p:P:qs:wX:x:l:zgetopt error: z-hz-dz-ez-mz-oz-pz-Pz-qz-wz-sz#-s subsystem option only on Windowsz-xz-Xz-Ez-lz-a�=z-r�site�warnings�encodings.utf_8�encodings.latin_1�Pythonzceval.czfrozen_extensions.cz(Using Python source directory)�Include�Moduleszconfig.c.inzfrozenmain.czPc\frozen_dllmain.c�libzpython%sz	config-%s�includezfrozen_dllmain.cz-Izneeded directory %s not foundz%s: not a directoryzneeded file %s not foundz%s: not a plain fileZSetupz'at least one filename argument requiredzargument %s not foundz.binzCreated output directoryz%s: mkdir failed (%s)ZserviceZservicemanagerz	dummy.pydz.*�*zimportlib._bootstrap�_frozen_importlibz"There are some missing modules: %rz$Warning: unknown modules remain: %s
� �__main__�wz$(OPT)z$(LDLIBRARY)�CFLAGS�CPPFLAGSz
$(MODLIBS)z$(LIBS)z
$(SYSLIBS)zNow run "make" in�endzto build the target:z#Now run "make" to build the target:)r
zwarningsrr
���r)A�sys�path�platform�len�argv�open�read�split�IOError�usage�getopt�error�str�print�__doc__�append�modulefinderZAddPackagePath�exec_prefix�prefix�os�exists�join�version�abiflags�isdir�isfile�basename�splitext�mkdir�OSError�winmakemakefileZget_custom_entry_point�
ValueError�dirnameZModuleFinderZ
add_module�__file__Zimport_hookZ	load_file�modulesZ
run_scriptZreportZany_missing�exit�
makefreeze�sorted�keys�__code__�checkextensions�remove�checkextensions_win32�name�stderr�writeZwrite_extension_tableZ
CExtension�makemakefile�locals�close�sort�bkfile�
makeconfig�
parsesetupZgetmakevars)Qr.r-�
extensionsZexcludeZ	addn_linkrZmodargs�debugZodirrZ
replace_pathsZerror_if_any_missingZfail_importZfrozen_cZconfig_c�target�makefileZ	subsystem�posZoptionsZwhyZopts�args�msg�o�a�f�rZ	implicits�moduleZishomer2Zflagged_versionZextensions_cZbinlibZincldirZconfig_h_dirZconfig_c_inZfrozenmain_cZmakefile_inZfrozendllmain_cZsupp_sourcesZdefinesZincludesZ
check_dirs�dir�files�fileZsetup�argZ
scriptfiler>�baseZextZ
base_frozen_cZ
base_config_cZbase_targetZcustom_entry_pointZpython_entry_is_mainr:Zmf�mod�dictZmissing�builtins�unknownZmodsZaddfilesZfrozen_extensionsZaddmodsrFZxtrasZmaindefnZoutfpZinfpZcflagsZcppflagsZlibsZsomevarsZmakevars�key�rg�8/opt/alt/python34/lib64/python3.4/Tools/freeze/freeze.py�mainns4
',)'

					

	
	
	$
	











	

0 


#


		






	
	

	

ricCs?tjt_td|�tdtjd�tjd�dS)NzError:zUse ``%s -h'' for helprr)rrH�stdoutr)r r?)rWrgrgrhr%�s
r%)
r*r,r&r/rrDrOr@rJrPrNrir%rgrgrgrh�<module>Ws��