\bgddlZddlZddlZddlmZmZmZddlmZddlm Z ddl m Z ddl m Z ddlmZGd d ejeZGd d ZdS) N)_normalization_path namespaces) easy_install)_read_utf8_with_fallback)log)DistutilsOptionError) convert_pathceZdZdZdZejddgzZejdgzZdZdZ dZ dd Z e d Z dd ZddZdZdZd S)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 filerFc|jr0d|_||n||dS)NT)r multi_versionuninstall_linkuninstall_namespacesinstall_for_developmentwarn_deprecated_optionsselfs k/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/command/develop.pyrunz develop.runse > +!%D     ! ! !  % % ' ' ' '  ( ( * * * $$&&&&&cfd|_d|_tj|d|_d|_dS)N.)regg_pathrinitialize_options setup_pathalways_copy_fromrs rrzdevelop.initialize_options&s6 '--- #rreturnNc ddl}|d}|jg|_t j||||j tj dtj |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_indexscanglobrfilename_component_brokenospathjoin install_diregg_linkegg_baserabspathrnormpathr Distribution PathMetadatar#dist_resolve_setup_pathr)rr&ei egg_link_fntargetrs rr*zdevelop.finalize_options-s  ' ' 3 3[M %d+++    ' 2 2333  4R[ A AK O  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) replacer1seprstripcurdircountrr8r2r3r )r6r4r path_to_setupresolvedrFs rr<zdevelop._resolve_setup_pathVs!((55<"',,{Hm"T"TUU ** v  &*   rcX|d|dd|dtjr+|tjdt_|t jd|j|j |j sTt|jdd5}| |j d z|jzdddn #1swxYwY|d|j|j dS) Nr# build_extT)inplacezCreating %s (link to %s)wzutf-8)encoding ) run_commandreinitialize_command setuptoolsbootstrap_install_fromrinstall_namespacesr infor5r6dry_runopenwriterrprocess_distributionr;no_deps)rfs rrzdevelop.install_for_developmentksg $$$ !!+t!<<< %%%  , 5   j? @ @ @04J - !!! +T]DMJJJ| @dmS7;;; @q ,t>??? @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !!$ t|3CDDDDDs &C==DDctj|jrt jd|j|jdt|jD}||j g|j |j gfvrt j d|dS|j stj |j|j s||j|jjrt j ddSdS)NzRemoving %s (link to %s)c6g|]}|S)rE).0lines r z*develop.uninstall_link..s0 rz$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r1r2existsr5r rUr6r splitlinesrrwarnrVunlink update_pthr; distributionscripts)rcontentss rrzdevelop.uninstall_links  7>>$- ( ( ) H/ N N N4T]CCNNPPH $-1QRRR?JJJ< ) $-(((| ' OODI & & &   $ N HL M M M M M N Nrcr||jurtj||S|||jjpgD]t}t jt|}t j |}t|}| ||||udSN) r;rinstall_egg_scriptsinstall_wrapper_scriptsrgrhr1r2r7r basenamerinstall_script)rr; script_name script_path script_texts rrlzdevelop.install_egg_scriptss ty 3D$?? ? $$T*** ,4: M MK'//,{*C*CDDK'**;77K2;??K   k; L L L LtrcJt|}tj||Srk)VersionlessRequirementrrmrr;s rrmzdevelop.install_wrapper_scriptss"%d++3D$???rr!N)__name__ __module__ __qualname____doc__ descriptionr user_optionsboolean_optionscommand_consumes_argumentsrrr* staticmethodr<rrrlrmr^rrr r s((9K,;L0L #2k]BO!&'''$$$' ' ' ' R\(EEEE,NNNN(&@@@@@rr c,eZdZdZddZdefdZdZdS) rta 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' r!Nc||_dSrk)_VersionlessRequirement__distrus r__init__zVersionlessRequirement.__init__s  rnamec,t|j|Srk)getattrr)rrs r __getattr__z"VersionlessRequirement.__getattr__st{D)))rc|jSrkr$rs ras_requirementz%VersionlessRequirement.as_requirements   rrv)rwrxryrzrstrrrr^rrrtrts\  *****!!!!!rrt)r/r1rRrrrsetuptools.command.easy_installr unicode_utilsr distutilsr distutils.errorsr distutils.utilr DevelopInstallerr rtr^rrrs  8888888888888888444444111111''''''[@[@[@[@[@j)<[@[@[@|!!!!!!!!!!r