Viewing File: /opt/alt/python35/lib64/python3.5/distutils/command/__pycache__/install.cpython-35.opt-2.pyc



Yfg
@sddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZdd	lmZdd
l
mZddlmZddlmZd
ZddddddddddiZdddddddddddidddddddddddid eiZerdd!dd!dd"dd#dd$ied%<dd!dd!dd&dd'dd$ied(<d+ZGd)d*d*eZdS),N)log)Command)DEBUG)get_config_vars)DistutilsPlatformError)
write_file)convert_path
subst_varschange_root)get_platform)DistutilsOptionError)	USER_BASE)	USER_SITETpurelibz$base/Lib/site-packagesplatlibheadersz$base/Include/$dist_namescriptsz
$base/Scriptsdataz$baseunix_prefixz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/bin	unix_homez$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_namentz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbasent_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin	unix_userc@seZdZdZd_d`dadbdddd
fdcdddeddddfdfdgdhdidjdkdldmdngZdd%d(gZerejd,dd-efejd,d diZ	d.d/Z
d0d1Zd2d3Zd4d5Z
d6d7Zd8d9Zd:d;Zd<d=Zd>d?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXefdYefdZefd[efd\d]d^fgZdS)oinstallz'install everything from build directoryprefix=Ninstallation prefixexec-prefix=.(Unix only) prefix for platform-specific fileshome=+(Unix only) home directory to install under
install-base=;base installation directory (instead of --prefix or --home)zinstall-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)root=<install everything relative to this alternate root directoryinstall-purelib=;installation directory for pure Python module distributionsinstall-platlib=8installation directory for non-pure module distributionszinstall-lib=z4installation directory for all module distributions z3(overrides --install-purelib and --install-platlib)install-headers=(installation directory for C/C++ headersinstall-scripts=)installation directory for Python scripts
install-data=%installation directory for data filescompileccompile .py to .pyc [default]
no-compiledon't compile .py files	optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]forcef1force installation (overwrite any existing files)
skip-build2skip rebuilding everything (for testing/debugging)record=3filename in which to record list of installed filesuserz!install in user site-package '%s'cCsd|_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)Nr)prefixexec_prefixhomer=install_baseinstall_platbaserootinstall_purelibinstall_platlibinstall_headersinstall_libinstall_scriptsinstall_datar
install_userbaserinstall_usersiter.optimize
extra_pathinstall_path_filer6
skip_buildwarn_dir
build_base	build_librecord)selfrV,/opt/alt/python35/lib64/python3.5/install.pyinitialize_optionss2																	
							zinstall.initialize_optionscCsr|js|js|jr=|js-|jr=tdd|jrd|jsX|jrdtd|jr|js|js|js|js|jrtdtjdkr|jr|j	dd|_|j
dtjdkr|jn
|j|j
dt
jjd	}td
d\}}y
t
j}Wntk
rcd}YnXd
|jjd|jjd|jjd|d|d	dd|d	|dd|d
|d|d|d|i|_tr|j|jd<|j|jd<|j|j
d|j|jd<|j|jd<trjd	dlm}td||j|j|j
d|jr|j |j!dkr|jj"r|j#|_!n|j$|_!|j%d d!d"d#d$d%dd|j&|j!|_'tj(j)|j!|j*|_!|j+dk	rN|j,d&d d!d"d#d$d%|j
d'|j-d(d+d,dS)-Nz.must supply either prefix/exec-prefix/home or z)install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)baseposixz+exec-prefix option ignored on this platformzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rr?r@Z	dist_nameZdist_versionZ
dist_fullname
py_versionpy_version_shortpy_version_nodotZ
sys_prefixZsys_exec_prefixabiflagsuserbaseZusersitezpost-expand_basedirs()baseplatbase)pprintzconfig vars:zpost-expand_dirs()librrrrrZlibbasezafter prepending rootbuildrRrS)rRrR)rSrS).r?r@rArBrCrr=osnamewarn	dump_dirs
finalize_unixfinalize_othersysversionsplitrr`AttributeErrordistributionget_nameZget_versionZget_fullnameconfig_vars
HAS_USER_SITErKrLexpand_basedirsrrdprintexpand_dirscreate_home_pathrHZext_modulesrFrE
convert_pathshandle_extra_pathinstall_libbasepathjoin
extra_dirsrDchange_rootsZset_undefined_options)rUr[r?r@r`rdrVrVrWfinalize_optionss
	$	
	












	
	



	zinstall.finalize_optionscCsts
dSddlm}tj|dx|jD]}|d}|ddkre|dd}||jkr|j|}|j|}t||}n|j|}t||}tjd||fq5WdS)	Nr)
longopt_xlate:r>=z  %s: %sr)	rZdistutils.fancy_getoptrrdebuguser_optionsnegative_opt	translategetattr)rUmsgroptZopt_namevalrVrVrWrjss

zinstall.dump_dirscCs|jdk	s|jdk	r|jdkrK|jdkrK|jdksx|jdksx|jdksx|jdkrtddS|j	r|j
dkrtd|j
|_|_|jdn|j
dk	r|j
|_|_|jdn|jdkr^|jdk	r+tdtjjtj|_tjjtj|_n|jdkry|j|_|j|_|j|_|jddS)NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedrrz*must not supply exec-prefix without prefixr)rBrCrHrErFrGrIrJrr=rKr
select_schemerAr?r@rgr|normpathrm)rUrVrVrWrks<				zinstall.finalize_unixcCs|jrN|jdkr$td|j|_|_|jtjdn|jdk	r|j|_|_|jdnv|j	dkrtj
jtj	|_	|j	|_|_y|jtjWn%t
k
rtdtjYnXdS)Nz$User base directory is not specified_userrz)I don't know how to install stuff on '%s')r=rKrrBrCrrgrhrAr?r|rrmKeyError)rUrVrVrWrls"		
zinstall.finalize_othercCsRt|}xAtD]9}d|}t||dkrt||||qWdS)Ninstall_)INSTALL_SCHEMESSCHEME_KEYSrsetattr)rUrhschemekeyZattrnamerVrVrWrs



zinstall.select_schemecCsx{|D]s}t||}|dk	rtjdksFtjdkrXtjj|}t||j}t|||qWdS)NrYr)rrgrhr|
expanduserr	rsr)rUZattrsattrrrVrVrW
_expand_attrss
zinstall._expand_attrscCs|jdddgdS)NrBrCrD)r)rUrVrVrWruszinstall.expand_basedirscCs#|jddddddgdS)NrErFrHrGrIrJ)r)rUrVrVrWrwszinstall.expand_dirscGs>x7|D]/}d|}t||tt||qWdS)Nr)rrr)rUnamesrhrrVrVrWrys

zinstall.convert_pathscCs|jdkr|jj|_|jdk	rt|jtrT|jjd|_t|jdkr}|jd}}n3t|jdkr|j\}}ntdt|}nd}d}||_||_	dS)N,r>rr_zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsrZ)
rNrq
isinstancestrrolenrr	path_filer~)rUrr~rVrVrWrzs 		zinstall.handle_extra_pathc	GsDx=|D]5}d|}t||t|jt||qWdS)Nr)rr
rDr)rUrrhrrVrVrWrs

zinstall.change_rootscCs|js
dSttjjd}x`|jjD]O\}}|j|r5tjj|r5|j	d|tj
|dq5WdS)N~zos.makedirs('%s', 0o700)i)r=rrgr|rrsitems
startswithisdirZdebug_printmakedirs)rUrArhr|rVrVrWrxs	"zinstall.create_home_pathcCs|jsO|jd|jjdj}|jrO|tkrOtdx!|jD]}|j|q\W|j	r|j
|jr|j}|j
rt|j
}x2tt|D]}|||d||<qW|jt|j|fd|jttjjtj}ttjj|}tjjtjj|j}|jr|j	oq|jr||krtjd|jdS)Nrfz"Can't install when cross-compilingz'writing list of installed files to '%s'zmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)rPZrun_commandrqZget_command_objZ	plat_namerQrrget_sub_commandsrcreate_path_filerTget_outputsrDrrangeexecutermaprgr|rrmnormcaserHrOrr)rUZ
build_platcmd_nameoutputsZroot_lenZcounterZsys_pathrHrVrVrWruns6	
	
			!		zinstall.runcCsctjj|j|jd}|jrN|jt||jgfd|n|j	d|dS)Nz.pthzcreating %szpath file '%s' not created)
rgr|r}r{rrOrrr~ri)rUfilenamerVrVrWrCs		zinstall.create_path_filecCsg}xS|jD]E}|j|}x-|jD]}||kr5|j|q5WqW|jr|jr|jtjj|j	|jd|S)Nz.pth)
rget_finalized_commandrappendrrOrgr|r}r{)rUrrcmdrrVrVrWrQszinstall.get_outputscCsCg}x6|jD](}|j|}|j|jqW|S)N)rrextend
get_inputs)rUZinputsrrrVrVrWrbs
zinstall.get_inputscCs|jjp|jjS)N)rqZhas_pure_modulesZhas_ext_modules)rUrVrVrWhas_libnszinstall.has_libcCs
|jjS)N)rqhas_headers)rUrVrVrWrtszinstall.has_headerscCs
|jjS)N)rqhas_scripts)rUrVrVrWryszinstall.has_scriptscCs
|jjS)N)rqZhas_data_files)rUrVrVrWhas_data~szinstall.has_datarHrGrIrJZinstall_egg_infocCsdS)NTrV)rUrVrVrW<lambda>szinstall.<lambda>)rNr)rNr)rNr)r Nr!)r"Nr#)r$Nr%)r&Nr')r(Nr))r*Nr+)r,Nr-)r.r/r0)r1Nr2)r3r4r5)r6r7r8)r9Nr:)r;Nr<) __name__
__module____qualname__descriptionrZboolean_optionsrtrrrrXrrjrkrlrrrurwryrzrrxrrrrrrrrZsub_commandsrVrVrVrWrIs	
M(		,				r)rrrrr)rmrgZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rrtZWINDOWS_SCHEMErrrrVrVrVrW<module>sZ		
Back to Directory File Manager