grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ß”|j™iã@s&dZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZdd 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@s$eZdZdZgd¢Zgd¢Zer>e dddef¡e d¡ddiZ e e d d ƒZ d d „Z d d„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Z d3d4„Z!d5efd6efd7e fd8e!fd9d:d;„fgZ"dS)<Ú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=Nz|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.rHz"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)r5Z run_commandrSZget_command_objZ plat_namer6r rÚget_sub_commandsr‡Úcreate_path_filer9Ú get_outputsr)r†ÚrangeÚexecuterÚmaprIr_rrrOÚnormcaser-r4rrh)r;Z 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) rIr_r`r^r‡r4r‘rrarK)r;Úfilenamer<r<r=rŽOs ÿ þ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‡r4rIr_r`r^)r;r•r”Úcmdr˜r<r<r=r�]s    ÿzinstall.get_outputscCs.g}| ¡D]}| |¡}| | ¡¡q |S)z*Returns the inputs of all the sub-commands)r�r™ÚextendÚ get_inputs)r;Zinputsr”r›r<r<r=r�ns   zinstall.get_inputscCs|j ¡p|j ¡S)zSReturns true if the current distribution has any Python modules to install.)rSZhas_pure_modulesZhas_ext_modulesr:r<r<r=Úhas_libzs ÿzinstall.has_libcCs |j ¡S)zLReturns true if the current distribution has any headers to install.)rSÚ has_headersr:r<r<r=rŸ€szinstall.has_headerscCs |j ¡S)zMReturns true if the current distribution has any scripts to. install.)rSÚ has_scriptsr:r<r<r=r …szinstall.has_scriptscCs |j ¡S)zJReturns true if the current distribution has any data to. install.)rSZhas_data_filesr:r<r<r=Úhas_dataŠszinstall.has_datar-r,r.r/Zinstall_egg_infocCsdS)NTr<r:r<r<r=Ú•ózinstall.)#Ú__name__Ú __module__Ú __qualname__Ú descriptionriZboolean_optionsrWršrrjrlÚ sysconfigr!r>rcrLrMrNrqrrXrZr\r]rbr[r–rŽr�r�ržrŸr r¡Z sub_commandsr<r<r<r=rJsL;ÿ  N*  " ,  ür)Ú__doc__rOr¨rIZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rrWZWINDOWS_SCHEMErvrwrr<r<r<r=Úsd          û ûûñû ú