JdNdZddlmZddlmZddlmZmZddlmZmZm Z m Z ddl m Z m Z ddlmZddlmZdd lmZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd l Z dd l!Z!dd l"Z"dd l#Z#dd l$Z$dd l%Z%dd l&Z&dd l&m'Z'dd l(m)Z)dd l(m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2m3Z3m4Z4ddl-m5Z5m6Z6ddl7m8Z8ddl9m:Z:m;Z;mZ>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFdd l9Z9ddlGmHZHddlImJZJejKde9jLgdZMdZNdZOdZPdZQGdd e*ZRd!ZSd"ZTd#ZUd$ZVd%ZWGd&d'e>ZXGd(d)eXZYejZ[d*d+d,kreYZXd-Z\d.Z]d/Z^d0Z_dPd1Z`d2Zad3Zbd4ejcvrebZdnd5ZddQd7Zed8Zfd9Zgd:Zh dd;lmiZjn#ek$rd<ZjYnwxYwd=ZiGd>d?elZmemnZoGd@dAemZpGdBdCZqGdDdEeqZrGdFdGerZseqjtZteqjuZudHZvdIZwdJe]fdKZxdLZydMZzGdNdOe)Z{d S)Ra) Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html )glob) get_platform) convert_path subst_vars)DistutilsArgErrorDistutilsOptionErrorDistutilsErrorDistutilsPlatformError)logdir_util) first_line_re)find_executable)installN)get_path)SetuptoolsDeprecationWarning)Command) run_setup)setopt)unpack_archive) PackageIndexparse_requirement_arg URL_SCHEME) bdist_eggegg_info)Wheel) normalize_pathresource_stringget_distributionfind_distributions Environment Requirement Distribution PathMetadata EggMetadata WorkingSetDistributionNotFoundVersionConflict DEVELOP_DIST)ensure_directory) yield_linesdefault)category) easy_installPthDistributionsextract_wininst_cfgget_exe_prefixesc2tjddkS)NP)structcalcsizeR/opt/alt/python311/lib/python3.11/site-packages/setuptools/command/easy_install.pyis_64bitr:Ns ?3  1 $$r8c,|dS)Nutf8)encodess r9 _to_bytesr@Rs 88F  r8cT |ddS#t$rYdSwxYw)NasciiTF)r= UnicodeErrorr>s r9isasciirDVs@ t uus  ''cvtj|ddS)N z; )textwrapdedentstripreplace)texts r9 _one_linerrL^s. ?4 & & ( ( 0 0t < <Z1d?Z2dcd@Z3edAZ4dddDZ5dEZ6dFZ7dGZ8dHZ9dIZ:dJZ;ejdKZ<ejdLZ=dedNZ>ejdOZ?dPZ@dQZAdRZBdSZCdTZDdUZEdVZFdWZGejdXHZIdYZJeKeKdZd[\]ZLeKd^d_\ZMd`ZNdS)fr.z'Manage a download/build/install processz Find/get/install Python packagesT)zprefix=Nzinstallation prefix)zip-okzzinstall package as a zipfile) multi-versionmz%make apps have to require() a version)upgradeUz1force upgrade (searches PyPI for latest versions))z install-dir=dzinstall package to DIR)z script-dir=r?zinstall scripts to DIR)exclude-scriptsxzDon't install scripts) always-copyaz'Copy all needed packages to install dir)z index-url=iz base URL of Python Package Index)z find-links=fz(additional URL(s) to search for packages)zbuild-directory=bz/download/extract/build in DIR; keep the results)z optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])zrecord=Nz3filename in which to record list of installed files) always-unzipZz*don't install as a zipfile, no matter what)z site-dirs=Sz)list of directories where .pth files work)editableez+Install specified packages in editable form)no-depsNzdon't install dependencies)z allow-hosts=Hz$pattern(s) that hostnames must match)local-snapshots-oklz(allow building eggs from local checkouts)versionNz"print version information and exit)z no-find-linksNz9Don't load find-links defined in packages being installeduserNz!install in user site-package '%s') rNrPrUrRrWr`rbrergrhr]rNc tjdtd|_dx|_|_dx|_x|_|_d|_ d|_ d|_ d|_ dx|_ |_dx|_x|_|_dx|_x|_|_dx|_x|_|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ tBj"|_#tBj$|_%d|_&d|_'dx|_(|_)d|_*i|_+d|_,|j-j.|_.|j-/||j-0ddS)NzVeasy_install command is deprecated. Use build and pip and other standards-based tools.rr.)1warningswarnEasyInstallDeprecationWarningrhzip_oklocal_snapshots_ok install_dir script_direxclude_scripts index_url find_linksbuild_directoryargsoptimizerecordrR always_copy multi_versionr`no_deps allow_hostsrootprefix no_reportrginstall_purelibinstall_platlibinstall_headers install_libinstall_scripts install_data install_baseinstall_platbasesite USER_BASEinstall_userbase USER_SITEinstall_usersite no_find_links package_indexpth_filealways_copy_from site_dirsinstalled_projects_dry_run distributionverbose_set_command_optionsget_option_dictselfs r9initialize_optionszeasy_install.initialize_optionss  A )    044 d-DHHH4?T-A# &**  ?CC Ct'$*<:>> > t'7377 7DK$. ####   $ $ $!"044 -"$  (0  .. $#33NCC     r8cbd|D}tt|j|dS)Nc3K|]D}tj|stj|@|VEdSN)ospathexistsislink).0filenames r9 z/easy_install.delete_blockers..s`  !w~~h'' +-7>>(+C+C       r8)listmap _delete_path)rblockersextant_blockerss r9delete_blockerszeasy_install.delete_blockerssC  %-    S"O 4 455555r8ctjd||jrdStj|otj| }|rtn tj}||dS)Nz Deleting %s) r infodry_runrrisdirrrmtreeunlink)rris_treeremovers r9rzeasy_install._delete_pathsm %%% <  F'--%%BbgnnT.B.B*B#2&& r8cdjtj}td}d}t |jdit t )zT Render the Setuptools version and installation details, then exit. {}.{} setuptoolsz=setuptools {dist.version} from {dist.location} (Python {ver})Nr7)formatsys version_inforprintlocals SystemExit)verdisttmpls r9_render_versionzeasy_install._render_versionsU gnc./ --N kdk%%FHH%%&&&llr8cL |jo|tjd}t t j|_|j|j |j |j |tj jdtj jtj jtj j|jd|jdt!tddt!tddd t#jt&5|jt)jt)jd dddn #1swxYwY|jd t!td ddd|j|jd <|j|jd<|jr t8jst=jd| |!|"|#dddd|j$ |j%|_$|j&d|_&|'dd|'dd|jr|j(r|j(|_%|j)|_$|'ddtU|_+|j+,|-|j.|j/s|0tcj2dd}|j3p||_3|j+dd|_4|j%tk|j$fD]&}||j4vr|j46d|'|j7%d|j7dD}ndg}|j8'|9|j3|j4| |_8tu|j4tj;z|_<|j=9t}|j=t~r|j=|_=ng|_=|j@r,|j8A|j4tj;z|j&s|j8B|j=|'dd!|C|jD|_D|j/r|jEstd"|jGstd#g|_HdS)$Nr.r} exec_prefixabiflags platlibdirlib) dist_name dist_version dist_fullname py_versionpy_version_shortpy_version_nodot sys_prefixsys_exec_prefixrr)implementation_lowerimplementationpy_version_nodot_platwindiruserbaseusersitez6WARNING: The user site-packages directory is disabled.rorprtrFr)rororrorpr)rwrw__EASYINSTALL_INDEXzhttps://pypi.org/simple/c6g|]}|Sr7)rIrr?s r9 z1easy_install.finalize_options..0s DDD1QWWYYDDDr8,*) search_pathhosts)rvrvz9Must specify a build directory (-b) when using --editablez:No urls, filenames, or requirements specified (see --help))Irgrrsplitdict sysconfigget_config_vars config_varsupdaterget_name get_version get_fullnamermajorminorgetattr contextlibsuppressAttributeErrorr_get_implementationlower setdefaultrJrrrhrENABLE_USER_SITEr rk_fix_install_dir_for_user_siteexpand_basedirs expand_dirs_expandrprorset_undefined_optionsrr get_site_dirs all_site_dirsextend_process_site_dirsrr`check_site_dirrgetenvrr shadow_pathrinsertr{r create_indexr r local_indexrs isinstancestrrnscan_egg_linksadd_find_links_validate_optimizervrtrruoutputs)rr default_index path_itemrs r9finalize_optionszeasy_install.finalize_optionss /--//[&&((+  9 ; ;<< *3355 -99;;!.;;==$##9 T TCZ44!#|U;; ! !   0 0     # #(/(C(E(E(K(K(M(M")"="?"?%%                   ## # C2 & & . .sB 7 7   (,'<$'+'<$ 9 OT2 O HM N N N ++---   <):    ? "".DO   %!&D  "" 9    "" <    9 3- 3#3D "2DO ""9.BCCC*__ !!$"9"9$."I"IJJJ} "    ! ! ! "79STT 8=-aaa0)>$/+J+JJ 6 6I 000 ''9555   'DD(8(>(>s(C(CDDDEEEE   %!%!2!2D,.I J J J! ?   - -do > > > ""=2JKKK// >> = !5 #K y N#LNN N s+AG  G G c#jK|dStttj}d|dD}|D]k}t j|stjd|7t||vrt|dzt|VldS)Ncpg|]3}tj|4Sr7)rr expanduserrIrs r9rz3easy_install._process_site_dirs..Us=   ./BG  qwwyy ) )   r8rz"%s (in --site-dirs) does not existz$ (in --site-dirs) is not on sys.path) rrrrrrrr rkr)rnormpathrTs r9rzeasy_install._process_site_dirsOs   F~sx00  OOC     ( (A7==## (=qAAAA""(22*>>%Q'''''' ( (r8c t|}|tdvrtn"#t$r}td|d}~wwxYw|S)Nz--optimize must be 0, 1, or 2)intrange ValueErrorr)valueras r9rzeasy_install._validate_optimizecsl JJEE!HH$$  %   &/    s'* A AA c|jsdS||jd}t||jx|_|_t jd}||dS)z; Fix the install_dir if "--user" was used. Nz$User base directory is not specified_user) rhcreate_home_pathrr rrrname select_scheme)rmsg scheme_names r9rz+easy_install._fix_install_dir_for_user_siteps~y  F   (8C(-- -484IID1'''  ;'''''r8c|D]y}t||}|etjdkstjdkrtj|}t ||j}t|||zdS)Nposixnt)rrrrr rrsetattr)rattrsattrvals r9 _expand_attrszeasy_install._expand_attrss ) )D$%%C7g%%D',,S11C d&677dC(((  ) )r8c4|gddS)zNCalls `os.path.expanduser` on install_base, install_platbase and root.)rrr|Nr rs r9rzeasy_install.expand_basedirss% GGGHHHHHr8c8gd}||dS)z+Calls `os.path.expanduser` on install dirs.)rrrrrrNr")rdirss r9rzeasy_install.expand_dirss/    4     r8c|r |dtj|j|jjkrtj|j |jD]}|||j |j r|j }|j rFt|j }tt|D]}|||d||<ddlm}||j|j |fd|j z|tj|jjdS#tj|jjwxYw)NzXWARNING: The easy_install command is deprecated and will be removed in a future version.r) file_utilz'writing list of installed files to '%s')announcer WARNrr set_verbosityrur.rzrwrr|lenr distutilsr&execute write_filewarn_deprecated_options)rshow_deprecationspecrroot_lencounterr&s r9runzeasy_install.runs{   MM;    <4,4 4 4  dl + + + 9  : :!!$DL(89999{ ,9G"49~~H#(W#6#6GG+27+;HII+F((////// (4;*@=K   ( ( * * *  d/7 8 8 8 8 8C d/7 8 8 8 8s CD88 Ec tj}n/#t$r"tjdt j}YnwxYwtj|j d|zS)zReturn a pseudo-tempname base in the install directory. This code is intentionally naive; if a malicious party can write to the target directory you're already in deep doodoo. rztest-easy-install-%s) rgetpid Exceptionrandomrandintrmaxsizerjoinro)rpids r9pseudo_tempnamezeasy_install.pseudo_tempnamese  1)++CC 1 1 1.CK00CCC 1w||D,.Ds.JKKKs)AAcdSrr7rs r9r.z$easy_install.warn_deprecated_options r8c*t|j}tj|d}tj|sA tj|n+#ttf$r| YnwxYw||j v}|s|j s| }n| dz}tj|} |rtj|t|dtj|n+#ttf$r| YnwxYw|sG|j s@tjdd}t'j|j|j||r"|jt/||j |_nd|_|j r&tj|sd|_||_dS)z;Verify that self.install_dir is .pth-capable dir, if neededeasy-install.pthz .write-testw PYTHONPATHrN)rrorrr:rmakedirsOSErrorIOErrorcant_write_to_targetrrycheck_pth_processingr<ropencloseenvirongetr rk_easy_install__no_default_msgrr/)rinstdirr is_site_dirtestfile test_exists pythonpaths r9rzeasy_install.check_site_dirs!!1227<<);<<w~~g&& , , G$$$$W% , , ,))+++++ ,!33  ,4#5 ,3355KK++-- =H'..22K ,(Ih'''Xs##))+++ (####W% , , ,))+++++ , J4#5 J b99J HT*D,&> ! DM"s%A**%BB3A E%E('E(aS can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: %s The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s z This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option). a Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html Please make the appropriate changes for your system and try again. c|jtjd|jfz}tj|js|d|jzz }n |d|jzz }t|)NrF) _easy_install__cant_write_msgrexc_infororrr_easy_install__not_exists_id_easy_install__access_msgr )rrs r9rFz!easy_install.cant_write_to_targetso#s|~~a'8$:J&LLw~~d.// , 4$.. .CC 4$++ +CS!!!r8cl|j}tjd||dz}|dz}tj|}tddz} |rt j|tj |}t j |dt|d} | |j dit|d }t j}tjd kr}tj|\}} tj|d } | d kotj| } | r| }d dlm} | |dddgd tj|rtjd| |r|tj|rt j|tj|rt j|dSdS |r|tj|rt j|tj|rt j|n#|r|tj|rt j|tj|rt j|wwxYw#t0t2f$r|YnwxYw|jstjd|dS)z@Empirically verify whether .pth files are supported in inst. dirz Checking .pth file support in %s.pthz.okzz import os f = open({ok_file!r}, 'w') f.write('OK') f.close() rFT)exist_okrANr pythonw.exe python.exer)spawnz-Ez-cpassz-TEST PASSED: %s appears to support .pth filesz+TEST FAILED: %s does NOT support .pth filesFr7)ror rr<rrrrLrdirnamerCrHwriterrrIr executablerrr:rdistutils.spawnr]rDrErFryrk) rrMrok_file ok_existsrr_rZrabasenamealtuse_altr]s r9rGz!easy_install.check_pth_processings" 3W===''))F2U"GNN7++    ) ( # '"""goog..G K$ / / / /Xs##A (  //fhh//000  ^ 7d??(* j(A(A%GX',,w >>C ((L8,s++)%( 111111z4v6:::7>>'** HG GGIII7>>'**'Ig&&&7>>(++(Ih'''''(( GGIII7>>'**'Ig&&&7>>(++(Ih''' GGIII7>>'**'Ig&&&7>>(++(Ih''''(E! ( ( (  % % ' ' ' ' ' (H! M HBG L L Lus!+AM-D%K++A?M*-%NNc $|jss|dr^|dD]H}|d|zr||||d|zI||dS)z=Write all the scripts for `dist`, unless scripts are excludedscriptszscripts/N)rqmetadata_isdirmetadata_listdirinstall_script get_metadatainstall_wrapper_scripts)rr script_names r9install_egg_scriptsz easy_install.install_egg_scriptsYs# (;(;I(F(F #44Y??   &&zK'?@@##+%%j;&>?? $$T*****r8c,tj|rZtj|D]C\}}}|D]:}|jtj||;DdS|j|dSr)rrrwalkrappendr:)rrbaser$filesrs r9 add_outputzeasy_install.add_outputgs 7==   &%'WT]] F F!dE %FFHL'' T8(D(DEEEEF F F L   % % % % %r8c:|jrtd|ddS)NzInvalid argument zW: you can't use filenames or URLs with --editable (except via the --find-links option).)r`rrr0s r9 not_editablezeasy_install.not_editableos9 = ##44   r8c|jsdStjtj|j|jrt|jd|jddS)Nz already exists in z; can't do a checkout there)r`rrrr:rtkeyrrxs r9check_editablezeasy_install.check_editablewsq}  F 7>>"',,t';TXFF G G #4///1   r8c#$Ktjd} t|Vtj|ot |dSdS#tj|ot |wwxYw)Nz easy_install-)r})tempfilemkdtemprrrrr)rtmpdirs r9_tmpdirzeasy_install._tmpdirs!)9::: 6f++    GNN6 " " 5vf~~~~~ 5 5 5BGNN6 " " 5vf~~~~ 5 5s A2BFc |5}t|tst|rU|||j||}|d|||dcdddStj |r:|||d|||dcdddSt|}| ||j |||j|j|j |j}| d|z}|jr|dz }t%||jt(kr&||||d|cdddS|||j||cdddS#1swxYwYdS)NTz+Could not find suitable distribution for %rz2 (--always-copy skips system and development eggs)Using)rrr!rryrdownload install_itemrrrrr|fetch_distributionrRr`rxrr precedencer(process_distributionlocation)rr0depsrdlrrs r9r.zeasy_install.easy_installs \\^^ LvdK00 7d## 7%%d++++44T6BBB,,T2vtTJJ  L L L L L L L LW^^D))7%%d+++,,T4tLL L L L L L L L L166D    % % %%88fdlDM$$d&6D|CdJ#POOC$S)))L00))$dGDDD9 L L L L L L L L<((t}fdKK= L L L L L L L L L L L L L L L L L Ls&A-GA G(B#GGGGc|p|j}|p"tj||k}|p|d }|pJ|jduoAtjt |t |jk}|r&|s$|j|jD]}|j |krnd}tj dtj ||r4| |||}|D]}||||n4||g}|||d|d| |D] }||vr|cS dSdS)N.eggTz Processing %srr)rxrrr_endswithrrr project_namerr rre install_eggsregg_distribution)rr0rrrinstall_neededrdistss r9rzeasy_install.install_items(;4+;'N27??8+D+D+N'Hx/@/@/H/H+H'  ! - 2 GOON844 5 5 40 1 1 2   & &():; & &=H,,E-"& "'"2"28"<"<===  E%%dHf==E < <))$d;;;; <**8445E  % %dE!HdG D D D    4<<KKK     r8c tj||dS#t$r8tj||ddYdSwxYw)Nrunix)r_select_schemerrrJ)rrs r9rzeasy_install.select_schemeso O  "4 . . . . . O O O O ) )$ Wf0M0M N N N N N N Os>AAc|||j|||j|jvr|j||j|||||j|j<tj |j ||g|R| dr4|j s-|j |d|s |jsdS|'|j|jkrtjd|dS|||vr0|}t%t'|}tj d| t)g|g|j|j}n^#t.$r"}t1t'||d}~wt2$r'}t1||d}~wwxYw|js|jr:|D]7}|j|jvr'||8tj d|dS)Nzdependency_links.txtzSkipping dependencies for %szProcessing dependencies for %sz'Finished processing dependencies for %s) update_pthraddrr{removerprr rinstallation_report has_metadatarrget_metadata_linesrxrkas_requirementr!rr%resolver.r&r r'reportr)r requirementrrrdistreqdistrosras r9rz!easy_install.process_distributions  t$$$ 4#DH- - -   # #D ) ) ) T"""   &&&,0) ))+tCdCCCDDD   4 5 5 &    - -''(>??    4D, 4 F  $[_)D)D H3T : : : F  D $;$;))++G%c'll33K 1;??? 4 nn,, t/1BGG$ 0 0 0 Q((a / 4 4 4 ,,! 3 4   =t4 = = =84#:::%%d&9&9&;&;<<< :KHHHHHs$/F66 HG H*"H  Hc|j|j S|drdS|dsdSdS)Nz not-zip-safeTzzip-safeF)rmr)rrs r9 should_unzipzeasy_install.should_unzipsO ; "{? "   ^ , , 4  ,, 4ur8ctj|j|j}tj|r%d}t j||j|j||Stj|r|}ntj ||krtj |tj |}t|dkrGtj||d}tj|r|}t|tj|||S)Nz<%r already exists in %s; build directory %s will not be keptrSr)rrr:rtr{rr rkrr_rlistdirr*r*shutilmove)rr0 dist_filename setup_basedstrcontentss r9 maybe_movezeasy_install.maybe_move sgll4/:: 7>>#   N  HS$(D$8* E E E  7== ' ' /&JJw}--;; -(((z*--H8}}!! " Z! E E 7==///!.J J$$$ r8c|jrdSt|D] }|j| dSr)rq ScriptWriterbestget_args write_script)rrrus r9rnz$easy_install.install_wrapper_scripts sX    F %%''0066 % %D D t $ $ $ % %r8c6t|}t||}|rA||t z}t ||z}||t|ddS)z/Generate a legacy script wrapper and install itr[N) rris_python_script_load_templaterr get_headerrr@)rrro script_textdev_pathr0 is_scriptbodys r9rlzeasy_install.install_script&s4&&(())$[+>>  F&&x00688;D&11+>>EK +y'='=sCCCCCr8cd}|r|dd}td|}|dS)z There are a couple of template scripts in the package. This function loads one of them and prepares it for use. z script.tmplz.tmplz (dev).tmplrutf-8)rJrdecode)rr raw_bytess r9rzeasy_install._load_template0sG  8<<77D#L$77 (((r8tr7cLfd|Dtjd|jtjj|}|jrdSt}t|tj |rt j |t|d|z5}||dddn #1swxYwYt|d|z dS)z1Write an executable file to the scripts directorycZg|]'}tjj|(Sr7)rrr:rp)rrVrs r9rz-easy_install.write_script..Bs+ @ @ @!RW\\$/1 - - @ @ @r8zInstalling %s script to %sNrAi)rr rrprrr:rvr current_umaskr*rrrHr`chmod)rrormodertargetmaskrZs` r9rzeasy_install.write_script?sR  @ @ @ @x @ @ @    -{DOLLLdo{;;  <  F   7>>& ! !  If    &#* % %  GGH                   fedl#####s$DD  D c|j|j|jd} ||dd}|||gS#t$rYnwxYw|}t j|r,|dst|||j n>t j |rt j |}| |r |jr|||||}t j|d}t j|st%t j|dd}|s/t'dt j |zt)|dkr/t'dt j |z|d }|jr*t-j|||gS|||S) N)r.exez.whl.pyzsetup.pyrz"Couldn't find a setup script in %srSzMultiple setup scripts in %sr) install_egg install_exe install_wheelrKeyErrorrrisfilerrunpack_progressrabspath startswithrtrr:rrr r*r`r rreport_editablebuild_and_install) rr0rr installer_map install_distr setup_scriptsetupss r9rzeasy_install.install_eggsSsA$$&   9(##%%bcc*L !L778 8    D   7>>- ( ( 81G1G1N1N 8 =&$2F G G G G W]]= ) ) 877J  ! !& ) ) J( J-1-=}jIIJw||J ;; w~~l++ %"',,z3 CCDDF $8GOOM2236{{Q$2GOOM223"!9L = D HT))$ == > > >I)), CC Cs"A AAc tj|r/t|tj|d}n!t t j|}tj ||S)NEGG-INFO)metadata) rrrr#r:r$ zipimport zipimporterr" from_filename)regg_pathrs r9rzeasy_install.egg_distributionsw 7== " " D#Hbgll8;E/G/GHHHH#9#8#B#BCCH)(XFFFFr8c tj|jtj|}tj|}|jst|||}tj |r!tj ||stj |r;tj |stj||jnDtj |r%|tj|fd|z d}tj |r3||rt$jd}}nwt$jd}}nh||r|||jd}}n4d}||rt$jd}}nt$jd}}||||f|dztj|tj|fzt5|| n #t6$rt5|d wxYw||||S) Nr Removing FMovingCopying ExtractingTz %s to %sfix_zipimporter_caches)rrr:rorerrr*rrsamefilerrr remove_treer,rrrrcopytreermkpathunpack_and_compilecopy2r_update_dist_cachesr6rv)rrr destinationrnew_dist_is_zippedrZrQs r9rzeasy_install.install_eggsgll   G  X & &  gook22 | * [ ) ) )$$X.. GNN; ' ') ,.G,<,.s=    GLLT!W - -   r8)rr)r0r r"rKrrrr:egg_namerr*r# _provider exe_to_eggrrHr`itemsrJtitlerIrrrr make_zipfilerrr) rrrcfgrregg_tmp _egg_infopkg_infrZkvrps @r9rzeasy_install.install_exesT!-00 ; :]J  V44GGJ 22\^^   7<< &(@AA  V#GLL*55 ',,y*55!!!%gy99  w///w~~g&& Wc""A GG- . . . *-- K K1(((GG!))C*=*=*C*C*E*E*E*EqqqIJJJ GGIIIW\\)Y77      $--d33       gt|T\    &111r8c  t| gg i fd}t||g} D]}|dr|d}|d}t j|ddz|d<tjj g|R} || |t j ||| t j tj dt j|dD]} t| rtj d| dz} tj| sat#| d } | d t| d z| d S) z;Extract a bdist_wininst to the directories an egg would usecR|} D]c\}}||rG||t|dz}|d}t jjg|R}|}|ds|dratj |d|d<d tj |dd< |n^|drI|dkrCd tj |dd< ||cSe|d stj d |dS) N/.pyd.dllrSrrSCRIPTS/rYzWARNING: can't process %s)rrr*rrrr:rr strip_modulesplitextrsr rk) srcrr?oldnewpartsrr native_libsprefixes to_compile top_levels r9processz(easy_install.exe_to_egg..processs A$  S<<$$ CHHII.CIIcNNE',w7777CB{{6**/bkk&.A.A/$-$:59$E$Eb CD "'"2"258"<"=%(version)s") # this version or higher z Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on PYTHONPATH, or by being added to sys.path by your code.) Installedcd}|jrG|js@|d|jzz }|jt t t jvr |d|jzz }|j }|j }|j }d}|tzS)z9Helpful installation message for display to package usersz %(what)s %(eggloc)s%(extras)srFr) ryr~_easy_install__mv_warningrorrrr_easy_install__id_warningrrrgr) rreqrwhatregglocrrgextrass r9rz easy_install.installation_reportXs/   0dn 0 4$++ +Cs>38'D'DDDtd/// ,VXX~r8aR Extracted editable version of %(spec)s to %(dirname)s If it uses setuptools in its setup script, you can activate it in "development" mode by going to that directory and running:: %(python)s setup.py develop See the setuptools documentation for the "develop" command for more info. ctj|}tj}d|jt zzS)NrF)rrr_rra_easy_install__editable_msgr)rr0rr_pythons r9rzeasy_install.report_editableqs3'//,//d)FHH444r8ctjdttjdtt |}|jdkr'd|jdz z}|dd|zn!|jdkr|dd|jr|dd tj d |t|dzdd | t||dS#t$r#}td |jd|d}~wwxYw) Nzdistutils.command.bdist_eggzdistutils.command.egg_infor)rrSrrz-qz-nz Running %s %s zSetup script exited with )rmodulesrrrrrrrr rr*r:rrr ru)rrrrurs r9rzeasy_install.run_setupvsQ *>?$     lD ) ) ) ) )    .12<  s D E (EE cddg}tjdtj|} |tj|||||||t|g}g}|D];}||D]0}|| |j |1<|s|j stj d||t|tj|jS#t|tj|jwxYw)Nrz --dist-dirz egg-dist-tmp-)r}dirz+No eggs found in %s (setup script problem?))r~rrrr__set_fetcher_optionsrsrr rrrr rkrr)r) rrrrudist_dirall_eggseggsr{rs r9rzeasy_install.build_and_installsh\*#" (E(E    ,  % %bgool&C&C D D D KK ! ! ! NN<T : : :"H:..HD M M$SMMMDKK 0 0 K KLLLLM #  #F!### 8     dl + + + + 8     dl + + + +s C D//*EcD|jd}d}i}|D]\}}||vr |d||<t |}t j|d}tj ||dS)a When easy_install is about to run bdist_egg on a source dist, that source dist might have 'setup_requires' directives, requiring additional fetching. Ensure the fetcher options given to easy_install are available to that command as well. r.)rsrrrrvr{rS)r.z setup.cfgN) rrcopyrrrrr:r edit_config) rrtei_optsfetch_directives fetch_optionsr{rsettings cfg_filenames r9r5z!easy_install._set_fetcher_optionss#33NCCHHJJ    ( (HC***!$QM#  ]333w||D+66 <22222r8c |jdS|j|jD]v}|js|j|jkrt jd||j||j|jvr|j|jw|js|j|jjvrt jd|n\t jd||j ||j|jvr|j |j|j rdS|j |jdkrdStj|jd}tj|rtj|t'|d5}||j|jdzddddS#1swxYwYdS)Nz&Removing %s from easy-install.pth filez4%s is already the active version in easy-install.pthz"Adding %s to easy-install.pth filersetuptools.pthwtrF)rr{ryrr rrrpathsrrsrsaverrr:rorrrHr` make_relative)rrrTrrZs r9rzeasy_install.update_pthsI = Ftx( 4 4A% !* *E*E H=q A A A M  # # #zT--- '' 333! ;} 333J =tDDD !!$'''=(888$++DM::: <  F  8| # # F7<< 02BCC 7>>( # # Ih    (D ! ! GQ GGDM// >>E F F F G G G G G G G G G G G G G G G G G Gs66G99G=G=c2tjd|||S)NzUnpacking %s to %s)r debug)rrrs r9rzeasy_install.unpack_progresss &S111 r8cggfd}t|||js?D]>}tj|tjdzdz}t ||=dSdS)NcF|dr+|ds|n?|ds|dr|||j r|pdS)Nr EGG-INFO/r z.so)rrrsrr)rrrto_chmodrs r9pfz+easy_install.unpack_and_compile..pfs||E"" %3>>++F+F %!!#&&&&f%% %e)<)< %$$$  c * * *|#+3t 3r8imi)rrrrstatST_MODEr)rrrrMrZrrLrs` @@r9rzeasy_install.unpack_and_compiles  4 4 4 4 4 4 4 xb111 *%%%|   DL1U:fDa    r8c>tjrdSddlm} t j|jdz ||dd|j|jr|||jd|jt j|jdS#t j|jwxYw)Nr)rrS)rvforcer) rdont_write_bytecodedistutils.utilrr r)rrrv)rrrs r9rzeasy_install.byte_compiles  "  F////// ,  dlQ. / / / Laq$, O O O O}  a L  dl + + + + +C dl + + + +s ABBa bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s and your PYTHONPATH environment variable currently contains: %r Here are some of your options for correcting the problem: * You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files * You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) * You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again. c|jsdSttjd}t |jD]c}||rLtj |s-| d|ztj |dddS)zCreate directories under ~.N~zos.makedirs('%s', 0o700)i) rhrrrr  only_strsrvaluesrr debug_printrC)rhomers r9rzeasy_install.create_home_path/sy  FBG..s3344d.557788 ) )Dt$$ )RW]]4-@-@ )  !;d!BCCC D%((( ) )r8z/$base/lib/python$py_version_short/site-packagesz $base/binrrz$base/Lib/site-packagesz $base/Scriptsc|dj}|jrt|}|j|d<|jt j|j}| D]'\}}t||dt|||(ddl m }|D]`}t||}|L|||}t jdkrt j|}t|||adS)Nrrtr)rr)get_finalized_commandrr}rINSTALL_SCHEMESrKrrDEFAULT_SCHEMErrrrSrrr )rrrschemerrrs r9rzeasy_install._expandEs00;;G ; -{++K"&+K )--bgt7JKKF#\\^^ - - c4t,,4D$,,,------ ) )D$%%C jk227g%%',,S11CdC(((  ) )r8)T)Fr)rr7)r%)O__name__ __module__ __qualname____doc__ descriptioncommand_consumes_argumentsrr user_optionsboolean_options negative_optrrrrr staticmethodrrrrrr rrr3r<r.rrGrHlstriprTrVrWrFrGrprvryr|rcontextmanagerrr.rrrrrrnrlrrrrrrrrr'r(rr.rrrr5rrrrrIrLrrr]r^rr7r8r9r.r.bs}114K!% 17GM769G?H < F @KHH6E 5? F :T^KL9L<O#H-LL/ / / b666\rrrh((\(&  \  ( ( ()))III ! ! !9999: L L L   +#+#+#Z'x (   VXX&ho'   VXX  #8?$   VXX """999v + + +&&&666LLLLB" " " " HOOO+/'I'I'I'IR.%%% DDDD ) )\ )$$$$(1D1D1DfGGG626262p+2+2+2\333j222:#8? $   VXX#8?$   L    %X_ &   VXX555 ,,,,0333.'G'G'GR &,,,&'x(   <UWW=@)))ddI"   OT-"N )))))r8r.ctjddtj}t d|S)NrBr)rrJrKrpathsepfilter)rs r9 _pythonpathro\s7 JNN< , , 2 22: > >E $  r8c gttjg}tjtjkr|tj|D]}}|stjdvr5tj |ddntj dkritj |ddj tj dtj |ddgn6|tj |ddgtjdkr d |vrtj d }|s3tj |d d d j tj d}|tdtdf}fd|Dt jrt jt'jt*5t!jdddn #1swxYwYt/t1t2S)z& Return a list of 'site' dirs )os2emxriscosLibz site-packagesrrz python{}.{}z site-pythondarwinzPython.frameworkHOMELibraryPythonrpurelibplatlibc3$K|] }|v|V dSrr7)rr?sitedirss r9rz get_site_dirs..s->>!AX,=,=A,=,=,=,=>>r8N)rrorr}rrsrrrr:seprrrJrKrrrrrrrgetsitepackagesrrr)rr}rYhome_sp lib_pathsr{s @r9rras H OOKMM""" |H #*$$((()!)!   </ / / OOBGLLHH I I I I Vs]] OO (M(#*:;#   VUM::     OO VUO<<    <8 # #  V + + z~~f%%  ',,    GNC, -         ##Xi%8%88I OO>>>>y>>>>>> ('''  ^ , ,00,..///000000000000000C1122H Os/'J""J&)J&c#Ki}|D]Q}t|}||vrd||<tj|sd||<tj|sc|tj|fV|SdS)zBYield sys.path directories that might contain "old-style" packagesrSrY)r@rBimportN) rrrrrrrHr:rr+rIrrstrip)inputsseenr_rurrZlineslines r9 expand_pathsrs D&-&- )) d?? W w}}W%%   7##un - -D==(( ===RW\\'40011AQ((E GGIII - -??8,,%dkkmm444<<T w}}T**BJt,,,,,,, - -&-&-r8cFt|d} tj|}| |dS|d|dz |dz }|dkr |dS||dz t jd|d\}}}|dvr |dS||d|zz d d d }tj |} ||} | d d d } | tj } |tj| n*#tj$rY|dSwxYw|dr|ds |dS||S#|wxYw)znExtract configuration data from a bdist_wininst .exe Returns a configparser.RawConfigParser, or None rbN  z:  7AY*fQi7 r>>2  1 y2~#]6166"::>>VU . . .(  % yBK()))44*400 66&>>DZZq))!,F]]3#<#>#>??F MM"+f-- . . . .!      z** #//'2J2J      sHH H 6AH 4H A>F H F0H /F00-H 4H H c ,gd}tj|} |D]}|j}|d}t |dkr\|ddkrP|ddr5|dd|d dd fnt |dks|d s|d r|d d vr| | }t|D]b}| dd}|ds#||dd|ddfc|n#|wxYwd|D}|||S)z4Get exe->egg path translations for a given .exe file))zPURELIB/r)zPLATLIB/pywin32_system32r)zPLATLIB/r)r zEGG-INFO/scripts/)zDATA/lib/site-packagesrrr r)rrSz .egg-inforNrKrYz -nspkg.pth)PURELIBPLATLIB\rrc@g|]\}}||fSr7)r)rrVys r9rz$get_exe_prefixes..s(44441aA444r8)rZipFileinfolistrrr*rrr:upperrrr+rIrJrrsrIsortreverse) exe_filenamerrOrrrrpths r9r1r1sH  %%AJJLL L LD=DJJsOOE5zzQ58z#9#98$$[11OOArr(;(;['IJJJE5zzQdmmF&;&;}}\** Qx~~#99966$<<..00&x00LLC))++--dC88C>>(33L eAhhh*Dr(JKKK   448444H MMOOO  Os FGGcdeZdZdZdZd fd ZdZdZedZ fdZ fd Z d Z xZ S) r/z)A .pth file with Distribution paths in itFr7c ||_ttt||_tt j|j|_| t gddt|j D]2}tt|jt|d3dS)NT)rrrrr{rrr_basedir_loadsuper__init__r+rDrr)rrr{r __class__s r9rzPthDistributions.__init__(s  S::;; %bgoodm&D&DEE   T4((( ++ @ @D TX1$==>> ? ? ? ? @ @r8cg|_d}t|j}tj|jr8t|jd}|D] }| drd}| }|j || r'| drttj|j|x}|jd<tj|r||vr"|jd|_d||< ||jr |sd|_|jr`|jd sE|j|jr#|jd ?dSdSdSdS)NFrtrT#r rS)rDrfromkeysr{rrrrrHrrrsrIrr:rrpopdirtyrI)r saw_importrrZrrs r9rzPthDistributions._load1s  }}T]++ 7>>$- ( ( T]D))A  ??8,,!%J{{}} !!$'''zz||tzz||'>'>s'C'C)7GLLt44))tz"~w~~d++tt||JNN$$$!%DJT GGIII : j DJj B!5!5!7!7  JNN   j B!5!5!7!7         r8c|jsdStt|j|j}|rt jd|j||}d |dz}tj |jrtj |jt|jd5}||dddn #1swxYwYnWtj |jr3t jd|jtj |jd|_dS)z$Write changed .pth file back to diskNz Saving %srFrCzDeleting empty %sF)rrrrFrDr rHr _wrap_linesr:rrrrrHr`r)r rel_pathsrdatarZs r9rEzPthDistributions.savePs\z  FT/<<==  % Ik4= 1 1 1$$Y//E99U##d*Dw~~dm,, ) $-(((dmT** a                W^^DM * * % I)4= 9 9 9 Idm $ $ $ s C..C25C2c|Srr7)rs r9rzPthDistributions._wrap_linesfs r8c |j|jvo)|j|jvp|jtjk}|r&|j|jd|_t|dS)z"Add `dist` to the distribution mapTN) rrDr{rgetcwdrsrrr)rrnew_pathrs r9rzPthDistributions.addjs M +  T]2- ,    J  dm , , ,DJ  Dr8c|j|jvr4|j|jd|_|j|jv4t |dS)z'Remove `dist` from the distribution mapTN)rrDrrr)rrrs r9rzPthDistributions.removexs`mtz)) J  dm , , ,DJmtz)) tr8c.tjt|\}}t |j}|g}tjdkrdp tj}t ||kr||jkrH|tj | | |Stj|\}}||t ||k|S)Nr) rrrrr*raltsepr|rscurdirrr:)rrnpathlastbaselenrr|s r9rFzPthDistributions.make_relativesgmmN4$8$899 tdl##i3&30"&%jjG## $$ RY''' xx&'--..KE4 LL    %jjG##Kr8)r7)r`rarbrcrrrrErirrrrF __classcell__)rs@r9r/r/#s33 E@@@@@@>,\            r8r/cPeZdZedZedZedZdS)RewritePthDistributionsc#@K|jV|D]}|V|jVdSr)preludepostlude)clsrrs r9rz#RewritePthDistributions._wrap_linessBk  DJJJJlr8z? import sys sys.__plen = len(sys.path) z import sys new = sys.path[sys.__plen:] del sys.path[sys.__plen:] p = getattr(sys, '__egginsert', 0) sys.path[p:p] = new sys.__egginsert = p + len(new) N)r`rarb classmethodrrLrrr7r8r9rrsW[ j   Gz   HHHr8rSETUPTOOLS_SYS_PATH_TECHNIQUErawrewritecttjtrtSt jtjS)z_ Return a regular expression based on first_line_re suitable for matching strings. )rr patternrrecompilerr7r8r9_first_line_rers@ -'-- :m+2244 5 55r8c|tjtjfvr5tjdkr%t |t j||Stj\}}}|d|dd|d|zf)NrrrSr1) rrrrrrNS_IWRITErrU)funcargexcetevrs r9 auto_chmodrsv  29%%%"'T// c4=!!!tCyy IBA a5"Q%%tttSS12 33r8ct|}t|tj|rt |dSt |dS)aa Fix any globally cached `dist_path` related data `dist_path` should be a path of a newly installed egg distribution (zipped or unzipped). sys.path_importer_cache contains finder objects that have been cached when importing data from the original distribution. Any such finders need to be cleared since the replacement distribution might be packaged differently, e.g. a zipped egg distribution might get replaced with an unzipped egg folder or vice versa. Having the old finders cached may then cause Python to attempt loading modules from the replacement distribution using an incorrect loader. zipimport.zipimporter objects are Python loaders charged with importing data packaged inside zip archives. If stale loaders referencing the original distribution, are left behind, they can fail to load modules from the replacement distribution. E.g. if an old zipimport.zipimporter instance is used to load data from a new zipped egg archive, it may cause the operation to attempt to locate the requested data in the wrong location - one indicated by the original distribution's zip archive directory information. Such an operation may then fail outright, e.g. report having read a 'bad local file header', or even worse, it may fail silently & return invalid data. zipimport._zip_directory_cache contains cached zip archive directory information for all existing zipimport.zipimporter instances and all such instances connected to the same archive share the same cached directory information. If asked, and the underlying Python implementation allows it, we can fix all existing zipimport.zipimporter instances instead of having to track them down and remove them one by one, by updating their shared cached zip archive directory information. This, of course, assumes that the replacement distribution is packaged as a zipped egg. If not asked to fix existing zipimport.zipimporter instances, we still do our best to clear any remaining zipimport.zipimporter related cached data that might somehow later get used when attempting to load data from the new distribution and thus cause such load operations to fail. Note that when tracking down such remaining stale data, we can not catch every conceivable usage from here, and we clear only those that we know of and have found to cause problems if left alive. Any remaining caches should be updated by whomever is in charge of maintaining them, i.e. they should be ready to handle us replacing their zip archives with new distributions at runtime. N)r_uncacherpath_importer_cache!_replace_zip_directory_cache_data*_remove_and_clear_zip_directory_cache_data) dist_pathrnormalized_paths r9rrsXx%Y//O _c5666D)/::::: 3?CCCCCr8cg}t|}|D]V}t|}||r0|||dztjdfvr||W|S)ap Return zipimporter cache entry keys related to a given normalized path. Alternative path spellings (e.g. those using different character case or those using alternative path separators) related to the same path are included. Any sub-path entries are included as well, i.e. those corresponding to zip archives embedded in other zip archives. rSr)r*rrrr|rs)rcacheresult prefix_lenpnps r9"_collect_zipimporter_cache_entriesrs}F_%%J  A   MM/ * * :j1n,-"&"== MM!    Mr8clt||D]"}||}||=|o |||}||||<#dS)a Update zipimporter cache data for a given normalized path. Any sub-path entries are processed as well, i.e. those corresponding to zip archives embedded in other zip archives. Given updater is a callable taking a cache entry key and the original entry (after already removing the entry from the cache), and expected to update the entry and possibly return a new one to be inserted in its place. Returning None indicates that the entry should not be replaced with a new one. If no updater is given, the cache entries are simply removed without any additional processing, the same as if the updater simply returned None. N)r)rrupdaterr old_entry new_entrys r9_update_zipimporter_cacher$s_0 G G!!!H !H59 5 5   E!H!!r8c&t||dSr)r)rrs r9rrDsou55555r8cDd}t|tj|dS)Nc.|dSr)clearrrs r92clear_and_remove_cached_zip_archive_directory_datazf_remove_and_clear_zip_directory_cache_data..clear_and_remove_cached_zip_archive_directory_dataIsr8rrr_zip_directory_cache)rrs r9rrHsE7BDDDDDDr8__pypy__cDd}t|tj|dS)Nc|tj||tj||Sr)rrrrrrs r9)replace_cached_zip_archive_directory_datazT_replace_zip_directory_cache_data..replace_cached_zip_archive_directory_data_sG OO     !$ ' ' '   Y;DA B B B r8rr)rrs r9rr^s?    " Y;= ? ? ? ? ? ?r8cZ t||ddS#ttf$rYdSwxYw)z%Is this string a valid Python script?execTF)r SyntaxError TypeError)rKrs r9 is_pythonr qsIh'''t  #uus **c tj|d5}|d}dddn #1swxYwYn#ttf$r|cYSwxYw|dkS)zCDetermine if the specified executable is a .sh (contains a #! line)zlatin-1)encodingr)N#!)rrHrrDrE)rafpmagics r9is_shr{s WZ) 4 4 4 GGAJJE                W  D=s.A: A>A>AAAc,tj|gS)z@Quote a command line argument according to Windows parsing rules subprocess list2cmdline)rs r9 nt_quote_argrs  "C5 ) ))r8c|ds|drdSt||rdS|dr.d|dvSdS)zMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc. r.pywTrr/rF)rr r splitlinesr)rrs r9rrs8#4#4V#<#<th''td##?;1133A6<<>>>> 5r8)rcdSrr7)rus r9_chmodrr>r8ctjd|| t||dS#tj$r }tjd|Yd}~dSd}~wwxYw)Nzchanging mode of %s to %ozchmod failed: %s)r rHrrerror)rrras r9rrsxI)4666)tT 8))) $a((((((((()s*AAAceZdZdZgZeZedZedZ edZ edZ edZ dZ edZd Zed Zed Zd S) CommandSpeczm A command spec for a #! header, specified as a list of arguments akin to those passed to Popen. c|S)zV Choose the best CommandSpec class based on environmental conditions. r7rs r9rzCommandSpec.bests  r8ctjtj}tjd|S)N__PYVENV_LAUNCHER__)rrr rrarJrK)r_defaults r9_sys_executablezCommandSpec._sys_executables07##CN33z~~3X>>>r8ct||r|St|tr ||S||S||S)zg Construct a CommandSpec from a parameter to build_scripts, which may be None. )rrfrom_environment from_string)rparams r9 from_paramzCommandSpec.from_paramsd eS ! ! L eT " " 3u::  ='')) )u%%%r8c>||gSr)r&r"s r9r(zCommandSpec.from_environments!sC''))*+++r8cFtj|fi|j}||S)z} Construct a command spec from a simple string representing a command line parseable by shlex.split. )shlexr split_args)rstringrs r9r)zCommandSpec.from_strings+  F55cn55s5zzr8ctj|||_t j|}t |sdg|jdd<dSdS)Nz-xr)r.r_extract_optionsoptionsrrrD)rrcmdlines r9install_optionszCommandSpec.install_optionssc{4#8#8#E#EFF )$//w & $vDL!    & &r8c|dzd}t|}|r|dpdnd}|S)zH Extract any options from the first line of the script. rFrrSr)rrmatchgrouprI) orig_scriptfirstr7r3s r9r2zCommandSpec._extract_optionssb t#//11!4  &&u--*/7%++a..&BR}}r8cV||t|jzSr)_renderrr3rs r9 as_headerzCommandSpec.as_headers#||D4 #5#55666r8cd}|D]8}||r!||r |ddcS9|S)Nz"'rSr )rr)item_QUOTESqs r9 _strip_quoteszCommandSpec._strip_quotessW " "Aq!! "dmmA&6&6 "AbDz!!! r8cNtjd|D}d|zdzS)Nc3nK|]0}t|V1dSr)r rBrI)rr?s r9rz&CommandSpec._render..sQ*G*G8^^%%F4&&(())%  EJ&E ..u55;;==  b%%d+++!lVXX5 ++E4MMCIIII    r8cRtjd|}|rtddS)z? Prevent paths in *_scripts entry point names. z[\\/]z+Path separators not allowed in script namesN)rsearchr)r has_path_seps r9rWzScriptWriter._ensure_safe_nameQs9 y400  LJKK K L Lr8ctjdt|rtn|SNzUse best)rjrkrlrIr)r force_windowss r9 get_writerzScriptWriter.get_writerZs<  j"?@@@-:J"''))) Jr8ctjdks tjdkr)tjdkrt S|S)zD Select the best ScriptWriter for this environment. win32javar)rrrr_namerIrr"s r9rzScriptWriter.best`s@ <7 " "rw&'8'8RX=M=M&++-- -Jr8c#K|||zfVdSrr7)rrZrrMrs r9rYzScriptWriter._get_script_argsjs$Vk)******r8rc|j|}|||S)z;Create a #! line, getting options (if any) from script_text)command_spec_classrr+r5r=)rrracmds r9rzScriptWriter.get_headerosH$))++66zBB K(((}}r8)NFr)rN)r`rarbrcrGrHrjrXr rirrNrJrrirWrbrrYrr7r8r9rrsA x! ! ! BVXXC F%---[-777[7["LL\LKK[K [++[+[r8rceZdZeZedZedZedZedZ e dZ dS)rIc^tjdt|Sr`)rjrkrlrr"s r9rbzWindowsScriptWriter.get_writerzs%  j"?@@@xxzzr8c~tt|}tjdd}||S)zC Select the best ScriptWriter suitable for Windows )ranaturalSETUPTOOLS_LAUNCHERra)rWindowsExecutableLauncherWriterrrJrK)r writer_lookuplaunchers r9rzWindowsScriptWriter.bestsA 6   :>>"7FFX&&r8c#Ktdd|}|tjddvr3djd it }tj|tgd}| || ||}fd|D}|z||zd |fVd S) z For Windows, add a .py extension.pyarrRPATHEXT;zK{ext} not listed in PATHEXT; scripts will not be recognized as executables.)rtr -script.py.pyc.pyorrcg|]}|zSr7r7rrVrs r9rz8WindowsScriptWriter._get_script_args..***D1H***r8rNr7) rrrJrrrrrjrk UserWarningr_adjust_header) rrZrrMrextrrrs ` r9rYz$WindowsScriptWriter._get_script_argss6v...u5 bj+113399#>> > >-!!xx!!C M#{ + + +KKK 3##E622****c***Sj&;.X======r8cd}d}|dkr||}}tjtj|tj}|||}||r|n|S)z Make sure 'pythonw' is used for gui and 'python' is used for console (regardless of what sys.executable is). r[r\rT)r0repl)rrescape IGNORECASEsub _use_header)rrZ orig_headerrr pattern_ob new_headers r9r~z"WindowsScriptWriter._adjust_headersm   E>> 'TGZ ' 2 2BMBB ^^;T^BB  __Z88IzzkIr8cz|ddd}tjdkpt|S)z Should _adjust_header use the replaced header? On non-windows systems, always use. On Windows systems, only use the replaced header if it resolves to an executable on the system. r)r "rd)rIrrr)r clean_headers r9rzWindowsScriptWriter._use_headers:"!B$'--c22 |w&G/,*G*GGr8N) r`rarbrFrirrbrrYr~rirr7r8r9rIrIws+[  ' '[ ' > >[ > J J[ J H H\ H H Hr8rIc$eZdZedZdS)rpc#K|dkrd}d}dg}nd}d}gd}|||}fd|D} |z||zd| fVd zt|d fVtsd z} | tdfVd Sd S) zG For Windows, add a .py extension and an .exe launcher rTz -script.pywrclirw)rrxrycg|]}|zSr7r7r{s r9rzDWindowsExecutableLauncherWriter._get_script_args..r|r8rrr[z .exe.manifestN)r~get_win_launcherr:load_launcher_manifest) rrZrrMr launcher_typerrhdrrm_names ` r9rYz0WindowsExecutableLauncherWriter._get_script_argss E>>!MC(CC!MC)))C  //****c***cz3,c8<<<< 6M+M::     zz > O+F1$77= = = = = = > >r8N)r`rarbrrYr7r8r9rprps->>[>>>r8rpcd|z}tr@tdkr|dd}n-|dd}n|dd}td|S)z Load the Windows launcher (executable) suitable for launching a script. `type` should be either 'cli' or 'gui' Returns the executable as a byte string. z%s.exez win-arm64rz-arm64.z-64.z-32.r)r:rrJr)type launcher_fns r9rrs{T/Kzz7 >>[ ( (%--c9==KK%--c6::KK!))#v66 < 5 55r8c~tjtd}|dt zS)Nzlauncher manifest.xmlr) pkg_resourcesrr`rvars)rmanifests r9rrs0,X7NOOH ??7 # #dff ,,r8Fc.tj|||Sr)rr)r ignore_errorsonerrors r9rrs =}g 6 66r8cVtjd}tj||S)N)rumask)tmps r9rrs! (5//CHSMMM Jr8c$td|S)z, Exclude non-str values. Ref #3063. c,t|tSr)rr)rs r9zonly_strs.. sjc22r8)rn)rWs r9rVrVs 22F ; ;;r8ceZdZdZdS)rlzF Warning for EasyInstall deprecations, bypassing suppression. N)r`rarbrcr7r8r9rlrl sr8rlr)r)|rcrrSrrrdistutils.errorsrrr r r+r r distutils.command.build_scriptsr rbrdistutils.commandrrrrrr~rrrNr7rGrjrr5rrr.rrrrrrrsetuptools.sandboxrsetuptools.commandrsetuptools.archive_utilrsetuptools.package_indexrrrrrsetuptools.wheelrrrrrrr r!r"r#r$r%r&r'r(_pathr*extern.jaraco.textr+filterwarnings PEP440Warning__all__r:r@rDrLr.rorrr0r1r/rrJrKrrrrrrrbuiltin_module_namesrr rrrrr ImportErrorrr r&sys_executablerFrrIrprNrJrrrrrVrlr7r8r9rsx  ''''''33333333$#######999999++++++%%%%%%     333333((((((%%%%%%22222232222222"""""" $$$$$$,,,,,, M,GHHHH    %%%===w)w)w)w)w)7w)w)w)t' CCCL+-+-+-\&&&R"""Jiiiii{iiiX     .   ,:>>1599YFF. 6 6 6444ODODODd(!!!!@666DDD")))2&%???&***    """""""         )))P%P%P%P%P%$P%P%P%h,,..########qqqqqqqqh>H>H>H>H>H,>H>H>HB>>>>>&9>>>@. 2666&--- %j7777 <<<$@s'F..F98F9