م{4IXddlmZddlmZddlmZddlZddlZddlm Z ddl m Z ddl m Z ddl m Z ddl Z d d lmZGd d e je ZGd dZdS)) convert_path)log)DistutilsOptionErrorN) easy_install)_normalization)_path) namespaces)_read_utf8_with_fallbackceZdZdZdZejddgzZejdgzZdZdZ 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 filerFc|jr0d|_||n||dS)NT)r multi_versionuninstall_linkuninstall_namespacesinstall_for_developmentwarn_deprecated_optionsselfs /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/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 '--- #rc 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) replacer0seprstripcurdircountrr7r1r2r)r5r3r path_to_setupresolvedrEs rr;zdevelop._resolve_setup_pathWs!((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_namespacesrinfor4r5dry_runopenwriterrprocess_distributionr:no_deps)rfs rrzdevelop.install_for_developmentlsg $$$ !!+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)rD).0lines r z*develop.uninstall_link..s0 rz$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r0r1existsr4rrTr5r splitlinesrrwarnrUunlink 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_scriptsrfrgr0r1r6rbasenamer install_script)rr: script_name script_path script_texts rrkzdevelop.install_egg_scriptss ty 3D$?? ? $$T*** ,4: M MK'//,{*C*CDDK'**;77K2;??K   k; L L L LtrcJt|}tj||Srj)VersionlessRequirementrrlrr:s rrlzdevelop.install_wrapper_scriptss"%d++3D$???rN)__name__ __module__ __qualname____doc__ descriptionr user_optionsboolean_optionscommand_consumes_argumentsrrr) staticmethodr;rrrkrlr]rrr r s((9K,;L0L #2k]BO!&'''$$$' ' ' R\(EEE,NNN(&@@@@@rr c$eZdZdZdZdZdZdS)rsa 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||_dSrj)_VersionlessRequirement__distrts r__init__zVersionlessRequirement.__init__s  rc,t|j|Srj)getattrr)rnames r __getattr__z"VersionlessRequirement.__getattr__st{D)))rc|jSrjr#rs ras_requirementz%VersionlessRequirement.as_requirements   rN)rurvrwrxrrrr]rrrsrssK  ***!!!!!rrs)distutils.utilr distutilsrdistutils.errorsrr0r.setuptools.command.easy_installrrQrrr unicode_utilsr DevelopInstallerr rsr]rrrs%''''''111111 888888%%%%%%!!!!!!444444[@[@[@[@[@j)<[@[@[@|!!!!!!!!!!r