Your IP : 18.119.255.183


Current Path : /opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/install.cpython-33.pyc

�
��fkc@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZejdkr�dZdZd0Zn&dd
lmZddlmZd1Zejdkr?idd6dd6dd6dd6dd6Zn)idd6dd6dd6dd6dd6Ziidd6dd6dd6dd6dd6d6idd6dd6d d6dd6dd6d!6ed"6idd6dd6dd6dd6dd6d#6Zer�id$d6d$d6d%d6d&d6d'd6ed(<id$d6d$d6d)d6d*d6d'd6ed+<id$d6d$d6d,d6d*d6d'd6ed-<nd2ZGd.d/�d/e�Z dS(3uFdistutils.command.install

Implements the Distutils 'install' command.iN(ulog(uCommand(uDEBUG(uget_config_vars(uDistutilsPlatformError(u
write_file(uconvert_pathu
subst_varsuchange_root(uget_platform(uDistutilsOptionErroru2.6(u	USER_BASE(u	USER_SITEu2.2u$baseupurelibuplatlibu$base/Include/$dist_nameuheadersu
$base/Scriptsuscriptsudatau$base/Lib/site-packagesu/$base/lib/python$py_version_short/site-packagesu5$platbase/lib64/python$py_version_short/site-packagesu9$base/include/python$py_version_short$abiflags/$dist_nameu	$base/binuunix_prefixu$base/lib/pythonu$base/lib64/pythonu$base/include/python/$dist_nameu	unix_homeuntuos2u	$usersiteu4$userbase/Python$py_version_nodot/Include/$dist_nameu$userbase/Scriptsu	$userbaseunt_useru=$userbase/include/python$py_version_short$abiflags/$dist_nameu
$userbase/binu	unix_useru4$userbase/include/python$py_version_short/$dist_nameuos2_homecBs�|EeZdZdZd_d`dadbd
d^ddfdcdddedd^ddfdfdgdhdidjdkdldmdngZdd$d'gZer�ejd+d^d,e	f�ejd+�nidd6Z
d-d.�Zd/d0�Zd1d2�Z
d3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEdF�ZdGdH�ZdIdJ�ZdKdL�ZdMdN�ZdOdP�ZdQdR�ZdSdT�ZdUdV�ZdWefdXefdYefdZefd[d\d]�fgZ d^S(ouinstallu'install everything from build directoryuprefix=uinstallation prefixuexec-prefix=u.(Unix only) prefix for platform-specific filesuhome=u+(Unix only) home directory to install underu
install-base=u;base installation directory (instead of --prefix or --home)uinstall-platbase=u8base installation directory for platform-specific files u$(instead of --exec-prefix or --home)uroot=u<install everything relative to this alternate root directoryuinstall-purelib=u;installation directory for pure Python module distributionsuinstall-platlib=u8installation directory for non-pure module distributionsuinstall-lib=u4installation directory for all module distributions u3(overrides --install-purelib and --install-platlib)uinstall-headers=u(installation directory for C/C++ headersuinstall-scripts=u)installation directory for Python scriptsu
install-data=u%installation directory for data filesucompileucucompile .py to .pyc [default]u
no-compileudon't compile .py filesu	optimize=uOulalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]uforceufu1force installation (overwrite any existing files)u
skip-buildu2skip rebuilding everything (for testing/debugging)urecord=u3filename in which to record list of installed filesuuseru!install in user site-package '%s'cCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS(uInitializes options.iiN(uNoneuprefixuexec_prefixuhomeuuseruinstall_baseuinstall_platbaseurootuinstall_purelibuinstall_platlibuinstall_headersuinstall_libuinstall_scriptsuinstall_datau	USER_BASEuinstall_userbaseu	USER_SITEuinstall_usersiteucompileuoptimizeu
extra_pathuinstall_path_fileuforceu
skip_builduwarn_diru
build_baseu	build_liburecord(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuinitialize_options�s2																	
							uinstall.initialize_optionscCs�|js|js|jr@|js-|jr@tdd��n|jrj|js[|jrjtd��n|jr�|js�|js�|js�|js�|jr�td��ntjdkr�|jr�|j	d�d+|_q�n|jd�tjdkr|j�n
|j
�|jd�tjj�d	}td
d�\}}y
tj}Wntk
rrd}YnXi|jj�d
6|jj�d6|jj�d6|d6|d	d�d6|d	|dd6|d6|d
6|d6|d6|d6|_tr#|j|jd<|j|jd<n|j�|jd�|j|jd<|j|jd<tr�d	dlm}td�||j�n|j �|jd�|jr�|j!�n|j"d+kr�|jj#r�|j$|_"q�|j%|_"n|j&d d!d"d#d$d%dd�|j'�|j"|_(tj)j*|j"|j+�|_"|j,d+k	rw|j-d&d d!d"d#d$d%�n|jd'�|j.d(d,d-�d+S(.uFinalizes options.u.must supply either prefix/exec-prefix/home or u)install-base/install-platbase -- not bothu9must supply either home or prefix/exec-prefix -- not bothuGcan't combine user with prefix, exec_prefix/home, or install_(plat)baseuposixu+exec-prefix option ignored on this platformupre-finalize_{unix,other}upost-finalize_{unix,other}()iuprefixuexec_prefixuu	dist_nameudist_versionu
dist_fullnameu
py_versioniupy_version_shortiupy_version_nodotu
sys_prefixusys_exec_prefixuabiflagsuuserbaseuusersiteupost-expand_basedirs()ubaseuplatbase(upprintuconfig vars:upost-expand_dirs()ulibupurelibuplatlibuscriptsudatauheadersulibbaseuafter prepending rootubuildu
build_baseu	build_libN(u
build_baseu
build_base(u	build_libu	build_lib(/uprefixuexec_prefixuhomeuinstall_baseuinstall_platbaseuDistutilsOptionErroruuseruosunameuwarnuNoneu	dump_dirsu
finalize_unixufinalize_otherusysuversionusplituget_config_varsuabiflagsuAttributeErrorudistributionuget_nameuget_versionuget_fullnameuconfig_varsu
HAS_USER_SITEuinstall_userbaseuinstall_usersiteuexpand_basedirsuDEBUGupprintuprintuexpand_dirsucreate_home_pathuinstall_libuext_modulesuinstall_platlibuinstall_purelibu
convert_pathsuhandle_extra_pathuinstall_libbaseupathujoinu
extra_dirsurootuchange_rootsuset_undefined_options(uselfu
py_versionuprefixuexec_prefixuabiflagsupprint((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyufinalize_options�s�
$	













	
	


	uinstall.finalize_optionscCs�ts
dSddlm}tj|d�x�|jD]�}|d}|ddkrh|dd	�}n||jkr�|j|}|j|�}t||�}n|j|�}t||�}tjd||f�q5WdS(
uDumps the list of user options.Ni(u
longopt_xlateu:iu=u  %s: %si����i����(	uDEBUGudistutils.fancy_getoptu
longopt_xlateulogudebuguuser_optionsunegative_optu	translateugetattr(uselfumsgu
longopt_xlateuoptuopt_nameuval((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu	dump_dirs�s

uinstall.dump_dirsc	Cs�|jdk	s|jdk	r�|jdkrK|jdkrK|jdksx|jdksx|jdksx|jdkr�t	d��ndS|j
r�|jdkr�td��n|j|_|_|j
d�n�|jdk	r|j|_|_|j
d�n�|jdkrg|jdk	r4t	d��ntjjtj�|_tjjtj�|_n|jdkr�|j|_n|j|_|j|_|j
d�dS(u&Finalizes options for posix platforms.uPinstall-base or install-platbase supplied, but installation scheme is incompleteNu$User base directory is not specifiedu	unix_useru	unix_homeu*must not supply exec-prefix without prefixuunix_prefix(uinstall_baseuNoneuinstall_platbaseuinstall_libuinstall_purelibuinstall_platlibuinstall_headersuinstall_scriptsuinstall_datauDistutilsOptionErroruuseruinstall_userbaseuDistutilsPlatformErroru
select_schemeuhomeuprefixuexec_prefixuosupathunormpathusys(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu
finalize_unix�s<	uinstall.finalize_unixcCs|jrQ|jdkr'td��n|j|_|_|jtjd�n�|j	dk	r�|j	|_|_|jd�ny|j
dkr�tjjt
j
�|_
n|j
|_|_y|jtj�Wn%tk
r�tdtj��YnXdS(u)Finalizes options for non-posix platformsu$User base directory is not specifiedu_useru	unix_homeu)I don't know how to install stuff on '%s'N(uuseruinstall_userbaseuNoneuDistutilsPlatformErroruinstall_baseuinstall_platbaseu
select_schemeuosunameuhomeuprefixupathunormpathusysuKeyError(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyufinalize_other�s"	
uinstall.finalize_othercCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS(u=Sets the install directories by applying the install schemes.uinstall_N(uINSTALL_SCHEMESuSCHEME_KEYSugetattruNoneusetattr(uselfunameuschemeukeyuattrname((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu
select_scheme�s



uinstall.select_schemecCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS(Nuposixunt(	ugetattruNoneuosunameupathu
expanduseru
subst_varsuconfig_varsusetattr(uselfuattrsuattruval((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu
_expand_attrs�s
uinstall._expand_attrscCs|jdddg�dS(uNCalls `os.path.expanduser` on install_base, install_platbase and
        root.uinstall_baseuinstall_platbaseurootN(u
_expand_attrs(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuexpand_basedirs�suinstall.expand_basedirscCs#|jddddddg�dS(u+Calls `os.path.expanduser` on install dirs.uinstall_purelibuinstall_platlibuinstall_libuinstall_headersuinstall_scriptsuinstall_dataN(u
_expand_attrs(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuexpand_dirs�suinstall.expand_dirscGs>x7|D]/}d|}t||tt||���qWdS(u!Call `convert_path` over `names`.uinstall_N(usetattruconvert_pathugetattr(uselfunamesunameuattr((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu
convert_paths�s

uinstall.convert_pathscCs�|jdkr!|jj|_n|jdk	r�t|jt�rZ|jjd�|_nt|j�dkr�|jd}}n3t|j�dkr�|j\}}ntd��t|�}nd}d}||_	||_
dS(u4Set `path_file` and `extra_dirs` using `extra_path`.u,iiiuY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsuN(u
extra_pathuNoneudistributionu
isinstanceustrusplitulenuDistutilsOptionErroruconvert_pathu	path_fileu
extra_dirs(uselfu	path_fileu
extra_dirs((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuhandle_extra_paths 		uinstall.handle_extra_pathc	GsDx=|D]5}d|}t||t|jt||���qWdS(u:Change the install directories pointed by name using root.uinstall_N(usetattruchange_rooturootugetattr(uselfunamesunameuattr((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuchange_roots#s

uinstall.change_rootscCs�|js
dSttjjd��}xc|jj�D]R\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5q5WdS(uCreate directories under ~.Nu~uos.makedirs('%s', 0o700)i�(uuseruconvert_pathuosupathu
expanduseruconfig_varsuitemsu
startswithuisdirudebug_printumakedirs(uselfuhomeunameupath((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyucreate_home_path)s	"uinstall.create_home_pathcCs�|jsU|jd�|jjd�j}|jrU|t�krUtd��qUnx!|j�D]}|j|�qbW|j	r�|j
�n|jr|j�}|j
r�t|j
�}x5tt|��D]}|||d�||<q�Wn|jt|j|fd|j�nttjjtj�}ttjj|�}tjjtjj|j��}|jr�|j	o�|jr�||kr�tjd|j�ndS(uRuns the command.ubuildu"Can't install when cross-compilingNu'writing list of installed files to '%s'u�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself(u
skip_buildurun_commandudistributionuget_command_obju	plat_nameuwarn_diruget_platformuDistutilsPlatformErroruget_sub_commandsu	path_fileucreate_path_fileurecorduget_outputsurootulenurangeuexecuteu
write_fileumapuosupathunormpathusysunormcaseuinstall_libuinstall_path_fileulogudebug(uselfu
build_platucmd_nameuoutputsuroot_lenucounterusys_pathuinstall_lib((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyurun5s6	
	
			!		uinstall.runcCsctjj|j|jd�}|jrN|jt||jgfd|�n|j	d|�dS(uCreates the .pth fileu.pthucreating %supath file '%s' not createdN(
uosupathujoinuinstall_libbaseu	path_fileuinstall_path_fileuexecuteu
write_fileu
extra_dirsuwarn(uselfufilename((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyucreate_path_fileas		uinstall.create_path_filecCs�g}xV|j�D]H}|j|�}x0|j�D]"}||kr5|j|�q5q5WqW|jr�|jr�|jtjj|j	|jd��n|S(u.Assembles the outputs of all the sub-commands.u.pth(
uget_sub_commandsuget_finalized_commanduget_outputsuappendu	path_fileuinstall_path_fileuosupathujoinuinstall_libbase(uselfuoutputsucmd_nameucmdufilename((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuget_outputsosuinstall.get_outputscCsCg}x6|j�D](}|j|�}|j|j��qW|S(u*Returns the inputs of all the sub-commands(uget_sub_commandsuget_finalized_commanduextendu
get_inputs(uselfuinputsucmd_nameucmd((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu
get_inputs�s
uinstall.get_inputscCs|jj�p|jj�S(uSReturns true if the current distribution has any Python
        modules to install.(udistributionuhas_pure_modulesuhas_ext_modules(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuhas_lib�suinstall.has_libcCs
|jj�S(uLReturns true if the current distribution has any headers to
        install.(udistributionuhas_headers(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuhas_headers�suinstall.has_headerscCs
|jj�S(uMReturns true if the current distribution has any scripts to.
        install.(udistributionuhas_scripts(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuhas_scripts�suinstall.has_scriptscCs
|jj�S(uJReturns true if the current distribution has any data to.
        install.(udistributionuhas_data_files(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuhas_data�suinstall.has_datauinstall_libuinstall_headersuinstall_scriptsuinstall_datauinstall_egg_infocCsdS(NT(uTrue(uself((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu<lambda>�suinstall.<lambda>N(uprefix=Nuinstallation prefix(uexec-prefix=Nu.(Unix only) prefix for platform-specific files(uhome=Nu+(Unix only) home directory to install under(u
install-base=Nu;base installation directory (instead of --prefix or --home)(uroot=Nu<install everything relative to this alternate root directory(uinstall-purelib=Nu;installation directory for pure Python module distributions(uinstall-platlib=Nu8installation directory for non-pure module distributions(uinstall-headers=Nu(installation directory for C/C++ headers(uinstall-scripts=Nu)installation directory for Python scripts(u
install-data=Nu%installation directory for data files(ucompileucucompile .py to .pyc [default](u
no-compileNudon't compile .py files(u	optimize=uOulalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](uforceufu1force installation (overwrite any existing files)(u
skip-buildNu2skip rebuilding everything (for testing/debugging)(urecord=Nu3filename in which to record list of installed files(!u__name__u
__module__u__qualname__udescriptionuNoneuuser_optionsuboolean_optionsu
HAS_USER_SITEuappendu	USER_SITEunegative_optuinitialize_optionsufinalize_optionsu	dump_dirsu
finalize_unixufinalize_otheru
select_schemeu
_expand_attrsuexpand_basedirsuexpand_dirsu
convert_pathsuhandle_extra_pathuchange_rootsucreate_home_pathurunucreate_path_fileuget_outputsu
get_inputsuhas_libuhas_headersuhas_scriptsuhas_datausub_commands(u
__locals__((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyuinstallgs�	
M�(		,				uinstallFT(upurelibuplatlibuheadersuscriptsudata(!u__doc__usysuosu	distutilsulogudistutils.coreuCommandudistutils.debuguDEBUGudistutils.sysconfiguget_config_varsudistutils.errorsuDistutilsPlatformErrorudistutils.file_utilu
write_fileudistutils.utiluconvert_pathu
subst_varsuchange_rootuget_platformuDistutilsOptionErroruversionuNoneu	USER_BASEu	USER_SITEuFalseu
HAS_USER_SITEusiteuTrueuWINDOWS_SCHEMEuINSTALL_SCHEMESuSCHEME_KEYSuinstall(((u>/opt/alt/python33/lib64/python3.3/distutils/command/install.pyu<module>s�	



?>