bgTddlZddlZddlmZddlmZddlmZddlm Z m Z Gdde Z Gd d e e Z dd gZ dS) N)ABCMeta)Path)fs_supports_symlink)Creator CreatorMetacJeZdZfdZedZedZxZS)ViaGlobalRefMetactd|_d|_t s d|_dSdS)Nz(the filesystem does not supports symlink)super__init__ copy_error symlink_errorrself __class__s u/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/virtualenv/create/via_global_ref/api.pyr zViaGlobalRefMeta.__init__ sQ !"$$ L!KD    L Lc|j SN)rrs rcan_copyzViaGlobalRefMeta.can_copys ?""rc|j Sr)rrs r can_symlinkzViaGlobalRefMeta.can_symlinks%%%r)__name__ __module__ __qualname__r propertyrr __classcell__rs@rr r ssLLLLL##X#&&X&&&&&rr cteZdZfdZedZefdZdZdZ dZ fdZ fdZ xZ S) ViaGlobalRefApict|||||_|j|_dSr)r r _should_symlinksymlinks system_siteenable_system_site_package)roptions interpreterrs rr zViaGlobalRefApi.__init__sC +...,,W55 *1*='''rct|ddt|dd}}|d|d}}dD]/}||kr|nd}||kr|nd}|dur|durdS|durdS|durdS0dS)NcopiesFr%)clizenv varfiledefaultT)getattr get_source)r(r+r%copy_srcsym_srclevels_optc_opts rr$zViaGlobalRefApi._should_symlink"s#7He<a>a#..x88':L:LZ:X:X':  E '5 0 0HHdE&%//FFTE}}$uu}}tt}}uuurc|t|||||ddddd|}|js|jst d|jr|dd dd d |jr#|d d |j ddddSdS)Nz--system-site-packagesF store_truer&zCgive the virtual environment access to the system site-packages dir)r.actiondesthelpz(neither symlink or copy method supportedz --symlinksTr%zZtry to use symlinks rather than copies, when symlinks are not the default for the platformz--copiesz --always-copyr+z[try to use copies rather than symlinks, even when symlinks are the default for the platform)r add_parser_arguments add_argumentadd_mutually_exclusive_grouprr RuntimeError)clsparserr)metaapp_datagrouprs rr;z$ViaGlobalRefApi.add_parser_arguments3s $$V[$III $V    3355 K  KIJJ J      #q     =     ,,#r        rc.|dSr) install_patchrs rcreatezViaGlobalRefApi.createRs rc|}|rn|jdz }tjd||dd|jdz }tjd|||ddSdS)Nz_virtualenv.pthz%create virtualenv import hook file %szimport _virtualenvutf-8encoding_virtualenv.pyz create %s)env_patch_textpurelibloggingdebug write_text)rtextpth dest_paths rrEzViaGlobalRefApi.install_patchUs""$$  9,!22C MA3 G G G NN/'N B B B '77I M+y 1 1 1   8 8 8 8 8  9 9rc |jttjdz 5}|d}|dttj t|j t|j cdddS#1swxYwYdS)zIPatch the distutils package to not be derailed by its configuration filesrKrHrIz"__SCRIPT_DIR__"N)rBensure_extractedr__file__parent read_textreplacereprospathrelpathstr script_dirrM)r resolved_pathrQs rrLzViaGlobalRefApi.env_patch_text_s ] + +DNN,ADT,T U U tYf **G*<>>>> \ [<999ttt OOOOOppppppppprr") metaclass)rNr[abcrpathlibrvirtualenv.inforcreatorrrr r"__all__rrrrs //////********&&&&&{&&&"NpNpNpNpNpgNpNpNpNpd r