3 öLÖj‡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#<d+ZGd)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-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez $base/binz$base/lib/pythonz$base/lib64/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 $userbaseÚnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez $userbase/binÚ unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-efƒejd,ƒd diZ d.d/„Z d0d1„Z d2d3„Z d4d5„Z d6d7„Zd8d9„Zd:d;„Zdd?„Zd@dA„ZdBdC„ZdDdE„ZdFdG„ZdHdI„ZdJdK„ZdLdM„ZdNdO„ZdPdQ„ZdRdS„ZdTdU„ZdVdW„ZdXefdYefdZefd[efd\d]d^„fgZdS)sÚinstallz'install everything from build directoryúprefix=Núinstallation prefixú exec-prefix=ú.(Unix only) prefix for platform-specific filesúhome=ú+(Unix only) home directory to install underú install-base=ú;base installation directory (instead of --prefix or --home)úinstall-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)úroot=ú|jƒD]2}|j|ƒ}x"|jƒD]}||kr&|j|ƒq&WqW|jrl|jrl|jtjj|j |jdƒƒ|S)z.Assembles the outputs of all the sub-commands.z.pth) r©Úget_finalized_commandr«Úappendr£rQrhr}r~r|)rWr±r°Úcmdr³rXrXrYr«bs  zinstall.get_outputscCs2g}x(|jƒD]}|j|ƒ}|j|jƒƒqW|S)z*Returns the inputs of all the sub-commands)r©r´ÚextendÚ get_inputs)rWZinputsr°r¶rXrXrYr¸ss  zinstall.get_inputscCs|jjƒp|jjƒS)zSReturns true if the current distribution has any Python modules to install.)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrYÚhas_libs zinstall.has_libcCs |jjƒS)zLReturns true if the current distribution has any headers to install.)rrÚ has_headers)rWrXrXrYrº…szinstall.has_headerscCs |jjƒS)zMReturns true if the current distribution has any scripts to. install.)rrÚ has_scripts)rWrXrXrYr»Šszinstall.has_scriptscCs |jjƒS)zJReturns true if the current distribution has any data to. install.)rrZhas_data_files)rWrXrXrYÚhas_data�szinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrYÚšszinstall.)rNr)rNr)rNr)r Nr!ú\base installation directory for platform-specific files (instead of --exec-prefix or --home))r"Nr¾)r#Nr$)r%Nr&)r'Nr(úginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))r)Nr¿)r*Nr+)r,Nr-)r.Nr/)r0r1r2)r3Nr4)r5r6r7)r8r9r:)r;Nr<)r=Nr>) Ú__name__Ú __module__Ú __qualname__Z descriptionr‡Zboolean_optionsrurµrrˆrZr�rkrlrmr�r�rvrxrzr{r€ryr²rªr«r¸r¹rºr»r¼Z sub_commandsrXrXrXrYrIsŒ   N3  " , r)rrrrr)Ú__doc__rnrhZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rruZWINDOWS_SCHEMEr–r—rrXrXrXrYÚsV