ef5ddlmZddlmZddlmZddlZddlZddlm Z ddl m Z ddl m Z ddl Z Gdd e j e ZGd d ZdS) ) convert_path)log)DistutilsOptionErrorN) easy_install)_path) namespacesceZdZdZdZejddgzZejdgzZdZdZ dZ d Z e d Z d Zd Zd ZdZdS)developzSet up package for developmentz%install package in 'development mode') uninstalluzUninstall this source package)z egg-path=Nz-Set the path to be used in the .egg-link filer Fc|jr0d|_||n||dS)NT)r multi_versionuninstall_linkuninstall_namespacesinstall_for_developmentwarn_deprecated_optionsselfs z/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/develop.pyrunz develop.runse > +!%D     ! ! !  % % ' ' ' '  ( ( * * * $$&&&&&cfd|_d|_tj|d|_d|_dS)N.)r egg_pathrinitialize_options setup_pathalways_copy_fromrs rrzdevelop.initialize_options$s6 '--- #rc ddl}|d}|jg|_t j||||j tj d|jdz}tj |j||_|j|_|j)tj |j|_t'j|j}t'jtj |j|j}||krt+d|z||||tj |j|j|_||j|j|j|_dS)Nregg_infoz*.eggz .egg-linkzA--egg-path must be a relative path from the install directory to  project_name) pkg_resourcesget_finalized_commandegg_nameargsrfinalize_optionsexpand_basedirs expand_dirs package_indexscanglobospathjoin install_diregg_linkegg_baserabspathrnormpathr Distribution PathMetadatardist_resolve_setup_pathr)rr"ei egg_link_fntargetrs rr&zdevelop.finalize_options+s  ' ' 3 3[M %d+++    ' 2 2333kK/  T%5{CC   = GOOBK88DM ..>"',,t/?"O"OPP v  &!#)*  "..   & &vrwr{/K/K L L/   22 M   M  rc|tjdd}|tjkrd|ddzz}t jtj |||}t jtj}||krtd|||S)z Generate a path from egg_base back to '.' where the setup script resides and ensure that path points to the setup path from $install_dir/$egg_path. /z../zGCan't get a consistent path to setup script from installation directory) replacer,seprstripcurdircountrr3r-r.r)r1r/r path_to_setupresolvedrAs rr7zdevelop._resolve_setup_pathRs!((55<"',,{Hm"T"TUU ** v  &*   rcT|d|dd|dtjr+|tjdt_|t jd|j|j |j sRt|jd5}| |j dz|jzdddn #1swxYwY|d|j|j dS)Nr build_extr=)inplacezCreating %s (link to %s)w ) run_commandreinitialize_command setuptoolsbootstrap_install_fromrinstall_namespacesrinfor0r1dry_runopenwriterrprocess_distributionr6no_deps)rfs rrzdevelop.install_for_developmentgsb $$$ !!+q!999 %%%  , 5   j? @ @ @04J - !!! +T]DMJJJ| @dmS)) @Q ,t>??? @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !!$ t|3CDDDDDs &C;;C?C?ctj|jrt jd|j|jt|j}d|D}|||j g|j |j gfvrt j d|dS|j stj |j|j s||j|jjrt j ddSdS)NzRemoving %s (link to %s)c6g|]}|S)r@).0lines r z*develop.uninstall_link..s @@@$ @@@rz$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r,r-existsr0rrOr1rQcloserrwarnrPunlink update_pthr6 distributionscripts)r egg_link_filecontentss rrzdevelop.uninstall_link}s 7>>$- ( ( ) H/ N N N //M@@-@@@H    ! ! !$-1QRRR?JJJ< ) $-(((| ' OODI & & &   $ N HL M M M M M N Nrc||jurtj||S|||jjpgD]}t jt|}t j |}t|5}| }dddn #1swxYwY| ||||dSN)r6rinstall_egg_scriptsinstall_wrapper_scriptsrarbr,r-r2rbasenamerQreadinstall_script)rr6 script_name script_pathstrm script_texts rrgzdevelop.install_egg_scriptss ty 3D$?? ? $$T*** ,4: M MK'//,{*C*CDDK'**;77Kk"" *d"iikk  * * * * * * * * * * * * * * *   k; L L L L  M MsB??C C cJt|}tj||Srf)VersionlessRequirementrrhrr6s rrhzdevelop.install_wrapper_scriptss"%d++3D$???rN)__name__ __module__ __qualname____doc__ descriptionr user_optionsboolean_optionscommand_consumes_argumentsrrr& staticmethodr7rrrgrhrXrrr r s((9K,;L0L #2k]BO!&'''$$$% % % N\(EEE,NNN"MMM$@@@@@rr c$eZdZdZdZdZdZdS)rqa Adapt a pkg_resources.Distribution to simply return the project name as the 'requirement' so that scripts will work across multiple versions. >>> from pkg_resources import Distribution >>> dist = Distribution(project_name='foo', version='1.0') >>> str(dist.as_requirement()) 'foo==1.0' >>> adapted_dist = VersionlessRequirement(dist) >>> str(adapted_dist.as_requirement()) 'foo' c||_dSrf)_VersionlessRequirement__distrrs r__init__zVersionlessRequirement.__init__s  rc,t|j|Srf)getattrr~)rnames r __getattr__z"VersionlessRequirement.__getattr__st{D)))rc|jSrfr rs ras_requirementz%VersionlessRequirement.as_requirements   rN)rsrtrurvrrrrXrrrqrqsK  ***!!!!!rrq)distutils.utilr distutilsrdistutils.errorsrr,r+setuptools.command.easy_installrrLrrDevelopInstallerr rqrXrrrs''''''111111 888888!!!!!!U@U@U@U@U@j)<U@U@U@p!!!!!!!!!!r