Plan 9 from Bell Labs’s /usr/web/sources/contrib/bichued/root/sys/lib/python/distutils/command/install.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�
��c@sWdZddklZdZddkZddkZddkZddkTddkl	Z	ddk
lZddkl
Z
dd	klZdd
klZddklZlZlZddklZdd
klZeidjo7hdd<dd<dd<dd<dd<Zn4hdd<dd<dd<dd<dd<Zhhdd<dd<dd<dd<dd<d<hdd<dd<dd<dd<dd<d<ed <hdd<dd<dd<dd<dd<d!<hdd<dd<dd<dd<dd<d"<Zd%Zd#e	fd$��YZdS(&sFdistutils.command.install

Implements the Distutils 'install' command.i�(tlogs8$Id: install.py 43363 2006-03-27 21:55:21Z phillip.eby $N(t*(tCommand(tDEBUG(tget_config_vars(tDistutilsPlatformError(t
write_file(tconvert_patht
subst_varstchange_root(tDistutilsOptionError(tglobs2.2s$basetpurelibtplatlibs$base/Include/$dist_nametheaderss
$base/Scriptstscriptstdatas$base/Lib/site-packagess/$base/lib/python$py_version_short/site-packagess3$platbase/lib/python$py_version_short/site-packagess0$base/include/python$py_version_short/$dist_names	$base/bintunix_prefixs$base/lib/pythons$base/include/python/$dist_namet	unix_hometnttmactos2tinstallcBsleZdZdEdFdGdHd	dDd
dfdIdJdKddDddfdLdMdNdOdPdQdRdSdTgZdd#d&gZhdd<Zd*�Zd+�Zd,�Z	d-�Z
d.�Zd/�Zd0�Z
d1�Zd2�Zd3�Zd4�Zd5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�Zd<�Zd=�Zd>efd?efd@efdAefdBdC�fgZRS(Us'install everything from build directorysprefix=sinstallation prefixsexec-prefix=s.(Unix only) prefix for platform-specific filesshome=s+(Unix only) home directory to install unders
install-base=s;base installation directory (instead of --prefix or --home)sinstall-platbase=s8base installation directory for platform-specific files s$(instead of --exec-prefix or --home)sroot=s<install everything relative to this alternate root directorysinstall-purelib=s;installation directory for pure Python module distributionssinstall-platlib=s8installation directory for non-pure module distributionssinstall-lib=s4installation directory for all module distributions s3(overrides --install-purelib and --install-platlib)sinstall-headers=s(installation directory for C/C++ headerssinstall-scripts=s)installation directory for Python scriptss
install-data=s%installation directory for data filestcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]tforcetfs1force installation (overwrite any existing files)s
skip-builds2skip rebuilding everything (for testing/debugging)srecord=s3filename in which to record list of installed filescCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_dS(Nii(tNonetprefixtexec_prefixthometinstall_basetinstall_platbasetroottinstall_purelibtinstall_platlibtinstall_headerstinstall_libtinstall_scriptstinstall_dataRtoptimizet
extra_pathtinstall_path_fileRt
skip_buildtwarn_dirt
build_baset	build_libtrecord(tself((s,/sys/lib/python/distutils/command/install.pytinitialize_options�s,														
							c
Cs�|ip|ip
|io%|ip
|iotdd�n|io!|ip
|io
td�ntidjo(|io|id�d|_q�n|i
d�tidjo|i�n|i�|i
d�t
iti�d}td	d
�\}}h|ii�d<|ii�d<|ii�d
<|d<|dd!d<|d<|d	<|d<|d
<|_|i�|i
d�|i|id<|i|id<to&ddkl}dGH||i�n|i�|i
d�|idjo-|iio|i|_qG|i|_n|idddddd�|i �|i|_!ti"i#|i|i$�|_|i%dj	o#|i&d dddddd�n|i
d!�|i'd"d%d&�dS('Ns.must supply either prefix/exec-prefix/home or s)install-base/install-platbase -- not boths9must supply either home or prefix/exec-prefix -- not bothtposixs+exec-prefix option ignored on this platformspre-finalize_{unix,other}spost-finalize_{unix,other}()iRRt	dist_nametdist_versiont
dist_fullnamet
py_versionitpy_version_shortt
sys_prefixtsys_exec_prefixspost-expand_basedirs()tbasetplatbasei�(tpprintsconfig vars:spost-expand_dirs()tlibRR
RRRtlibbasesafter prepending roottbuildR.R/(s
build_bases
build_base(s	build_libs	build_lib((RRRR R!R
tostnametwarnRt	dump_dirst
finalize_unixtfinalize_othertstringtsplittsystversionRtdistributiontget_nametget_versiontget_fullnametconfig_varstexpand_basedirsRR=texpand_dirsR&text_modulesR$R#t
convert_pathsthandle_extra_pathtinstall_libbasetpathtjoint
extra_dirsR"tchange_rootstset_undefined_options(R1R7RRR=((s,/sys/lib/python/distutils/command/install.pytfinalize_options�sl






				







	cCs�to�ddkl}|dGHx�|iD]�}|d}|ddjo|dd!}n|ii|�o-ti|i||�}t||�}n"ti||�}t||�}d||fGHq*WndS(Ni�(t
longopt_xlatet:it=s  %s: %s(	Rtdistutils.fancy_getoptR\tuser_optionstnegative_optthas_keyRGt	translatetgetattr(R1tmsgR\topttopt_nametval((s,/sys/lib/python/distutils/command/install.pyRD[s	

	cCss|idj	p|idj	ou|idjo |idjo|idjp0|idjp |idjp|idjo
t	d�ndSn|i
dj	o$|i
|_|_|id�n�|idjoQ|i
dj	o
t	d�ntiiti�|_tiiti
�|_
n!|i
djo|i|_
n|i|_|i
|_|id�dS(NsPinstall-base or install-platbase supplied, but installation scheme is incompleteRs*must not supply exec-prefix without prefixR(R RR!R&R#R$R%R'R(R
Rt
select_schemeRRRARVtnormpathRI(R1((s,/sys/lib/python/distutils/command/install.pyREms0 

cCs�|idj	o$|i|_|_|id�nz|idjotiit	i�|_n|i|_|_y|iti
�Wn#tj
otdti
�nXdS(NRs)I don't know how to install stuff on '%s'(
RRR R!RiRRARVRjRIRBtKeyErrorR(R1((s,/sys/lib/python/distutils/command/install.pyRF�scCsWt|}xFtD]>}d|}t||�djot||||�qqWdS(Ntinstall_(tINSTALL_SCHEMEStSCHEME_KEYSRdRtsetattr(R1RBtschemetkeytattrname((s,/sys/lib/python/distutils/command/install.pyRi�s

cCs}xv|D]n}t||�}|dj	oLtidjotii|�}nt||i�}t|||�qqWdS(NR3(	RdRRARBRVt
expanduserRRORo(R1tattrstattrRh((s,/sys/lib/python/distutils/command/install.pyt
_expand_attrs�s
cCs|idddg�dS(NR R!R"(Rv(R1((s,/sys/lib/python/distutils/command/install.pyRP�s	cCs#|iddddddg�dS(NR#R$R&R%R'R((Rv(R1((s,/sys/lib/python/distutils/command/install.pyRQ�s	cGs>x7|D]/}d|}t||tt||���qWdS(NRl(RoRRd(R1tnamesRBRu((s,/sys/lib/python/distutils/command/install.pyRS�s
cCs�|idjo|ii|_n|idj	o�t|i�tjoti|id�|_nt|i�djo|id}}n3t|i�djo|i\}}n
td�t	|�}n
d}d}||_
||_dS(Nt,iiisY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementst(R*RRKttypet
StringTypeRGRHtlenR
Rt	path_fileRX(R1R}RX((s,/sys/lib/python/distutils/command/install.pyRT�s 	c	GsDx=|D]5}d|}t||t|it||���qWdS(NRl(RoR	R"Rd(R1RwRBRu((s,/sys/lib/python/distutils/command/install.pyRY�s
c	Csu|ip|id�nx!|i�D]}|i|�q(W|io|i�n|io|i�}|ioBt|i�}x0t	t|��D]}|||||<q�Wn|i
t|i|fd|i�ntt
iiti�}tt
ii|�}t
iit
ii|i��}|io9|io|io$||jotid|i�ndS(NR@s'writing list of installed files to '%s's�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself(R,trun_commandtget_sub_commandsR}tcreate_path_fileR0tget_outputsR"R|txrangetexecuteRtmapRARVRjRItnormcaseR&R-R+Rtdebug(R1tcmd_nametoutputstroot_lentcountertsys_pathR&((s,/sys/lib/python/distutils/command/install.pytrun�s4




	!

	cCsetii|i|id�}|io'|it||igfd|�n|i	d|�dS(Ns.pthscreating %sspath file '%s' not created(
RARVRWRUR}R+R�RRXRC(R1tfilename((s,/sys/lib/python/distutils/command/install.pyR�s
	cCs�g}xX|i�D]J}|i|�}x2|i�D]$}||jo|i|�q5q5WqW|io4|io*|itii|i	|id��n|S(Ns.pth(
Rtget_finalized_commandR�tappendR}R+RARVRWRU(R1R�R�tcmdR�((s,/sys/lib/python/distutils/command/install.pyR�)s


cCsCg}x6|i�D](}|i|�}|i|i��qW|S(N(RR�textendt
get_inputs(R1tinputsR�R�((s,/sys/lib/python/distutils/command/install.pyR�:s
cCs|ii�p
|ii�S(sRReturn true if the current distribution has any Python
        modules to install.(RKthas_pure_modulesthas_ext_modules(R1((s,/sys/lib/python/distutils/command/install.pythas_libFscCs
|ii�S(N(RKthas_headers(R1((s,/sys/lib/python/distutils/command/install.pyR�LscCs
|ii�S(N(RKthas_scripts(R1((s,/sys/lib/python/distutils/command/install.pyR�OscCs
|ii�S(N(RKthas_data_files(R1((s,/sys/lib/python/distutils/command/install.pythas_dataRsR&R%R'R(tinstall_egg_infocCstS((tTrue(R1((s,/sys/lib/python/distutils/command/install.pyt<lambda>\sN(sprefix=Nsinstallation prefix(sexec-prefix=Ns.(Unix only) prefix for platform-specific files(shome=Ns+(Unix only) home directory to install under(s
install-base=Ns;base installation directory (instead of --prefix or --home)(sroot=Ns<install everything relative to this alternate root directory(sinstall-purelib=Ns;installation directory for pure Python module distributions(sinstall-platlib=Ns8installation directory for non-pure module distributions(sinstall-headers=Ns(installation directory for C/C++ headers(sinstall-scripts=Ns)installation directory for Python scripts(s
install-data=Ns%installation directory for data files(scompileRscompile .py to .pyc [default](s
no-compileNsdon't compile .py files(s	optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](sforceRs1force installation (overwrite any existing files)(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(srecord=Ns3filename in which to record list of installed files(t__name__t
__module__tdescriptionRR`tboolean_optionsRaR2R[RDRERFRiRvRPRQRSRTRYR�R�R�R�R�R�R�R�tsub_commands(((s,/sys/lib/python/distutils/command/install.pyRMs�		J	�	%				
					"		&	
										(spurelibsplatlibsheaderssscriptssdata(t__doc__t	distutilsRt__revision__RIRARGttypestdistutils.coreRtdistutils.debugRtdistutils.sysconfigRtdistutils.errorsRtdistutils.file_utilRtdistutils.utilRRR	R
RRJtWINDOWS_SCHEMERmRnR(((s,/sys/lib/python/distutils/command/install.pys<module>sj$
																									

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].