a [f>@s dZddlZddlZddlmZddlmZmZmZddl m Z ddl m Z ddl mZddlmZdd lmZdd lmZdd lmZdd lmZeeZGd ddeZeeeeeddddZeeeeeeeeeee e eee ee eee dddZ!dS)z6Legacy installation process, i.e. `setup.py install`. N) change_root)ListOptionalSequence)BuildEnvironment)InstallationError)Scheme) indent_log) ensure_dir)make_setuptools_install_args)runner_with_spinner_message) TempDirectoryc@s eZdZdS)LegacyInstallFailureN)__name__ __module__ __qualname__rrK/usr/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.pyrsr) record_linesrootreq_descriptionreturnc sttdfdd }|D]&}tj|}|dr||}qRqd|}t|g}|D]<}|} tj| r~| tjj 7} | tj || |qZ| t |tj|d} t| d$} | d|dWdn1s0YdS) N)pathrcs&dustj|s|St|SdS)N)osrisabsr)rrrr prepend_rootszBwrite_installed_files_from_setuptools_record..prepend_rootz .egg-infoz{} did not indicate that it installed an .egg-info directory. Only setup.py projects generating .egg-info directories are supported.zinstalled-files.txtw )strrrdirnameendswithformatrstripisdirsepappendrelpathsortr joinopenwrite) rrrrlineZ directoryZ egg_info_dirmessageZ new_linesfilenameZinst_files_pathfrrr,write_installed_files_from_setuptools_records,     r0)install_optionsglobal_optionsrhomeprefix use_user_site pycompilescheme setup_py_pathisolatedreq_name build_envunpacked_source_directoryrrcCsf|j}tdd2}ztj|jd}t|||||||||| |d }td| }t@| ||| dWdn1s0YWdn1s0Ytj|st d|WWddSWn*t y}zt |WYd}~n d}~00t |}|}Wdn1s,0YWdn1sL0Yt||| d S) Nrecord)kindzinstall-record.txt) r2r1record_filenamerr4 header_dirr3r5Zno_user_configr6zRunning setup.py install for )cmdcwdzRecord file %s not foundFT)Zheadersr rrr)r r r existsloggerdebug Exceptionrr*read splitlinesr0)r1r2rr3r4r5r6r7r8r9r:r;r<rr@Ztemp_dirr?Z install_argsZrunnerer/rrrrinstall>sDB   L rJ)"__doc__ZloggingrZdistutils.utilrtypingrrrZpip._internal.build_envrZpip._internal.exceptionsrZpip._internal.models.schemerZpip._internal.utils.loggingr Zpip._internal.utils.miscr Z$pip._internal.utils.setuptools_buildr Zpip._internal.utils.subprocessr Zpip._internal.utils.temp_dirr Z getLoggerrrDrFrrr0boolrJrrrrsF           &