选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
a fÍCiÇjã@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZmZmZdd lmZdd l mZdd lmZdd lmZdZddddddœZddddddœddddddœedœZe�rddddddœed <ddd!d"ddœed#<dZGd$d%„d%eƒZdS)&zFdistutils.command.install Implements the Distutils 'install' command.éN)Úlog)ÚCommand)ÚDEBUG)Úget_config_vars)ÚDistutilsPlatformError)Ú write_file)Ú convert_pathÚ subst_varsÚ change_root)Ú get_platform)ÚDistutilsOptionError)Ú USER_BASE)Ú USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez $base/Scriptsz$base)ÚpurelibÚplatlibÚheadersÚscriptsÚdataz/$base/lib/python$py_version_short/site-packagesz;$platbase/$platlibdir/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez $base/binz$base/lib/pythonz$base/$platlibdir/pythonz$base/include/python/$dist_name)Ú unix_prefixÚ unix_homeÚntz $usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz $userbaseZnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez $userbase/binÚ unix_userc@seZdZdZgd¢Zgd¢Zer>e dddef¡e d¡ddiZ d d „Z d d „Z d d„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3efd4efd5efd6efd7d8d9„fgZdS):Úinstallz'install everything from build directory))zprefix=Nzinstallation prefix)z exec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nzr)r%r&r+r(r)r*r,r-r r r.rÚ select_schemer$r"r#ÚhasattrrNÚ base_prefixrHÚenvironr^Únormpath)r9Zadditionr:r:r;rL‰sZ ÿþýüûÿ ÿ     ÿ  ÿþ zinstall.finalize_unixcCsº|jr8|jdurtdƒ‚|j|_|_| tjd¡n~|jdur\|j|_|_| d¡nZ|j durvtj   t j ¡|_ |j |_|_z| tj¡Wn t y´tdtjƒ‚Yn0dS)z)Finalizes options for non-posix platformsNroÚ_userrz)I don't know how to install stuff on '%s')r r.rr%r&rqrHrIr$r"r^rurNÚKeyErrorr8r:r:r;rM¼s& ÿ    ÿzinstall.finalize_othercCs<t|}tD]*}d|}t||ƒdur t||||ƒq dS)z=Sets the install directories by applying the install schemes.Úinstall_N)ÚINSTALL_SCHEMESÚ SCHEME_KEYSrkÚsetattr)r9rIÚschemeÚkeyÚattrnamer:r:r;rqÒs zinstall.select_schemecCsX|D]N}t||ƒ}|durtjdks.tjdkr:tj |¡}t||jƒ}t|||ƒqdS)Nr=r)rkrHrIr^Ú expanduserr rUr{)r9ÚattrsÚattrrnr:r:r;Ú _expand_attrsÛs   zinstall._expand_attrscCs| gd¢¡dS)zNCalls `os.path.expanduser` on install_base, install_platbase and root.)r%r&r'N©r‚r8r:r:r;rWäszinstall.expand_basedirscCs| gd¢¡dS)z+Calls `os.path.expanduser` on install dirs.)r(r)r+r*r,r-Nrƒr8r:r:r;rYészinstall.expand_dirscGs,|D]"}d|}t||tt||ƒƒƒqdS)z!Call `convert_path` over `names`.rxN)r{rrk©r9ÚnamesrIr�r:r:r;r[ïszinstall.convert_pathscCs¤|jdur|jj|_|jdurŒt d¡t|jtƒrB|j d¡|_t|jƒdkr`|jd}}n"t|jƒdkrz|j\}}ntdƒ‚t |ƒ}nd}d}||_ ||_ dS) z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.ú,r!rr?zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr>) r1rRrrJÚ isinstanceÚstrrPÚlenr rÚ path_filer`)r9rŠr`r:r:r;r\õs(   ÿ  ÿ zinstall.handle_extra_pathc Gs0|D]&}d|}t||t|jt||ƒƒƒqdS)z:Change the install directories pointed by name using root.rxN)r{r r'rkr„r:r:r;raszinstall.change_rootscCsb|js dSttj d¡ƒ}|j ¡D]8\}}| |¡r$tj |¡s$|  d|¡t  |d¡q$dS)zCreate directories under ~.Nú~zos.makedirs('%s', 0o700)iÀ) r rrHr^rrUÚitemsÚ startswithÚisdirZ debug_printÚmakedirs)r9r$rIr^r:r:r;rZszinstall.create_home_pathcCs"|js6| d¡|j d¡j}|jr6|tƒkr6tdƒ‚| ¡D]}| |¡q>|j r\|  ¡|j rº|  ¡}|j r t|j ƒ}tt|ƒƒD]}|||d…||<q†| t|j |fd|j ¡ttjjtjƒ}ttjj|ƒ}tj tj |j¡¡}|j�r|j �r|j�s||v�rt d|j¡dS)zRuns the command.rGz"Can't install when cross-compilingNz'writing list of installed files to '%s'zƒmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Z run_commandrRZget_command_objZ plat_namer4r rÚget_sub_commandsrŠÚcreate_path_filer7Ú get_outputsr'r‰ÚrangeÚexecuterÚmaprHr^rurNÚnormcaser+r2rrg)r9Z build_platÚcmd_nameÚoutputsZroot_lenZcounterZsys_pathr+r:r:r;Úrun)sD    ÿþÿÿþýz install.runcCsJtj |j|jd¡}|jr8| t||jgfd|¡n|  d|¡dS)zCreates the .pth fileú.pthz creating %szpath file '%s' not createdN) rHr^r_r]rŠr2r”rr`rJ)r9Úfilenamer:r:r;r‘Us ÿ þzinstall.create_path_filecCshg}| ¡D].}| |¡}| ¡D]}||vr"| |¡q"q |jrd|jrd| tj |j |jd¡¡|S)z.Assembles the outputs of all the sub-commands.rš) r�Úget_finalized_commandr’ÚappendrŠr2rHr^r_r])r9r˜r—Úcmdr›r:r:r;r’cs    ÿzinstall.get_outputscCs.g}| ¡D]}| |¡}| | ¡¡q |S)z*Returns the inputs of all the sub-commands)r�rœÚextendÚ get_inputs)r9Zinputsr—ržr:r:r;r ts   zinstall.get_inputscCs|j ¡p|j ¡S)zSReturns true if the current distribution has any Python modules to install.)rRZhas_pure_modulesZhas_ext_modulesr8r:r:r;Úhas_lib€s ÿzinstall.has_libcCs |j ¡S)zLReturns true if the current distribution has any headers to install.)rRÚ has_headersr8r:r:r;r¢†szinstall.has_headerscCs |j ¡S)zMReturns true if the current distribution has any scripts to. install.)rRÚ has_scriptsr8r:r:r;r£‹szinstall.has_scriptscCs |j ¡S)zJReturns true if the current distribution has any data to. install.)rRZhas_data_filesr8r:r:r;Úhas_data�szinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;Ú›ózinstall.) Ú__name__Ú __module__Ú __qualname__Ú descriptionrhZboolean_optionsrVr�rrir<rbrKrLrMrqr‚rWrYr[r\rarZr™r‘r’r r¡r¢r£r¤Z sub_commandsr:r:r:r;rIsJ;ÿ N3  " ,  ür)Ú__doc__rNrHZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rrVZWINDOWS_SCHEMEryrzrr:r:r:r;Úsb          û ûûñû ú