ó
    Lƒwj½ˆ  ã                  ót  • S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
JrJr  SSKJr  SSKJr  SSKJr  SSKJrJr  SS	KJr  SS
KJr  SSKJr  SSKJrJrJrJ r J!r!  SSK"J#r#J$r$J%r%J&r&J'r'J(r(  SSK%J)r)  SSK*J+r+J,r,  SSK-J.r.  SSK/J0r0  SSK1J2r2J3r3  SSK4J4r5  SSK6J6r7  SSK8J8r9  SSK:J:r;  SSK<J<r=  SSK>J>r?  \(       a  SSK@JArA  SSKBJCrC  \ " S\)S9rD\RŠ                  " \F5      rG " S S \5      rHS!rIS"rJ " S# S$\#5      rK " S% S&\5      rL " S' S(5      rM " S) S*\M5      rN " S+ S,5      rOS@S- jrPSAS. jrQ        SBS/ jrRS0 rSSCS1 jrTSCS2 jrU        SDS3 jrVSES4 jrWSFS5 jrX      SGS6 jrYSHS7 jrZSIS8 jr[SJS9 jr\ " S: S;\(Rº                  5      r^S<r_        SKS= jr` " S> S?\'RÂ                  5      rbg)Laè  
Create a wheel that, when installed, will make the source package 'editable'
(add it to the interpreter's path, including metadata) per PEP 660. Replaces
'setup.py develop'.

.. note::
   One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is
   to create a separated directory inside ``build`` and use a .pth file to point to that
   directory. In the context of this file such directory is referred as
   *auxiliary build directory* or ``auxiliary_dir``.
é    )ÚannotationsN)ÚIterableÚIteratorÚMapping)Úsuppress)ÚEnum)Úcleandoc)ÚchainÚstarmap)ÚPath)ÚTemporaryDirectory)ÚTracebackType)ÚTYPE_CHECKINGÚClassVarÚProtocolÚTypeVarÚcasté   )ÚCommandÚ_normalizationÚ_pathÚ_shutilÚerrorsÚ
namespaces)ÚStrPath)Úpy310Úpy312)Úfind_package_path)ÚDistribution)ÚInformationOnlyÚSetuptoolsDeprecationWarningé   )Úbuild)Úbuild_py)Ú	dist_info)Úegg_info)Úinstall)Úinstall_scripts)ÚSelf©Ú	WheelFileÚ_P)Úboundc                  ó8   • \ rS rSrSrSrSrSr\S	S j5       r	Sr
g)
Ú_EditableModeé5   zú
Possible editable installation modes:
`lenient` (new files automatically added to the package - DEFAULT);
`strict` (requires a new installation when files are added/removed); or
`compat` (attempts to emulate `python setup.py develop` - DEPRECATED).
ÚstrictÚlenientÚcompatc                óø   • U(       d  [         R                  $ UR                  5       nU[         R                  ;  a  [        R
                  " SU< S35      eUS:X  a  [        R                  " SSSS9  [         U   $ )NzInvalid editable mode: z. Try: 'strict'.ÚCOMPATzCompat editable installsa
  
                The 'compat' editable mode is transitional and will be removed
                in future versions of `setuptools`.
                Please adapt your code accordingly to use either the 'strict' or the
                'lenient' modes.
                zuserguide/development_mode.html)Úsee_docs)r/   ÚLENIENTÚupperÚ__members__r   ÚOptionErrorr!   Úemit)ÚclsÚmodeÚ_modes      Ú¯C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\setuptools/command/editable_wheel.pyÚconvertÚ_EditableMode.convertA   sv   € æÜ ×(Ñ(Ð(à—
‘
“ˆØœ×1Ñ1Ó1Ü×$Ò$Ð'>¸t¹hÐFVÐ%WÓXÐXà�HÓÜ(×-Ò-Ø*ðð ;òô  ˜UÑ#Ð#ó    © N)r=   ú
str | NoneÚreturnr/   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚSTRICTr7   r5   Úclassmethodr@   Ú__static_attributes__rC   rB   r?   r/   r/   5   s*   † ñð €FØ€GØ€Fàó$ó ó$rB   r/   zU
New or renamed files may not be automatically picked up without a new installation.
zt
Options like `package-data`, `include/exclude-package-data` or
`packages.find.exclude/include` may have no effect.
c                  ó   • \ rS rSr% SrSrSSSS\" \R                  =(       d    S5      4/rS	\	S
'   S r
SS jrSS jrS rS rSS jr        SS jrS rSS jr          SS jrSS jrS S jrS rS!S jr        S"S jrSrg)#Úeditable_wheeléh   z¢Build 'editable' wheel for development.
This command is private and reserved for internal use of setuptools,
users should rely on ``setuptools.build_meta`` APIs.
zBDO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel)z	dist-dir=Údz-directory to put final built distributions in)zdist-info-dir=ÚIz(path to a pre-build .dist-info directoryzmode=NÚ zHClassVar[list[tuple[str, str, str]] | list[tuple[str, str | None, str]]]Úuser_optionsc                ó<   • S U l         S U l        S U l        S U l        g ©N)Údist_dirÚdist_info_dirÚproject_dirr=   ©Úselfs    r?   Úinitialize_optionsÚ!editable_wheel.initialize_optionsx   s    € ØˆŒØ!ˆÔØˆÔØˆ�	rB   c                ó6  • U R                   nUR                  =(       d    [        R                  U l        UR
                  =(       d    0 U l        [        U R                  =(       d*    [        R                  R                  U R                  S5      5      U l        g )NÚdist)
ÚdistributionÚsrc_rootÚosÚcurdirrY   Úpackage_dirr   rW   ÚpathÚjoin)r[   r_   s     r?   Úfinalize_optionsÚeditable_wheel.finalize_options~   s_   € Ø× Ñ ˆØŸ=™=×5¬B¯I©IˆÔØ×+Ñ+×1¨rˆÔÜ˜TŸ]™]×T¬b¯g©g¯l©l¸4×;KÑ;KÈVÓ.TÓUˆ�rB   c                ó¾  •  U R                   R                  SS9  U R                  5         U R                  S5        U R	                  S5      nUR                  U R                  5        U R                  U5        g ! [         aX  nU R                  R                  =(       d    U R                  R                  5       n[        R                  " USU S35        e S nAff = f)NT)Úexist_okÚbdist_wheelz3An error occurred when building editable wheel for zl.
See debugging tips in: https://setuptools.pypa.io/en/latest/userguide/development_mode.html#debugging-tips)rW   ÚmkdirÚ_ensure_dist_infoÚreinitialize_commandÚget_finalized_commandÚwrite_wheelfilerX   Ú_create_wheel_fileÚ	Exceptionr`   ÚnameÚget_namer   Úadd_note)r[   rk   ÚexÚprojects       r?   ÚrunÚeditable_wheel.run„   sÇ   € ð	Ø�M‰M×Ñ¨ÐÑ.Ø×"Ñ"Ô$ð ×%Ñ% mÔ4Ø×4Ñ4°]ÓCˆKØ×'Ñ'¨×(:Ñ(:Ô;à×#Ñ# KÕ0øÜó 	Ø×'Ñ'×,Ñ,×L°×0AÑ0A×0JÑ0JÓ0LˆGÜ�NŠNØØEÀgÀYð Ofð fôð ûð	ús   ‚A7A: Á:
CÂACÃCc                óŽ  • U R                   cb  [        [        U R                  S5      5      nU R                  Ul        UR                  5         UR                  5         UR                   U l         g [        U R                   5      R                  S5      (       d   e[        U R                   S5      R                  5       (       d   eg )Nr%   z
.dist-infoÚMETADATA)rX   r   Údist_info_clsrn   rW   Ú
output_dirÚensure_finalizedrx   ÚstrÚendswithr   Úexists)r[   r%   s     r?   rm   Ú editable_wheel._ensure_dist_info™   s˜   € Ø×ÑÑ%Üœ]¨D×,EÑ,EÀkÓ,RÓSˆIØ#'§=¡=ˆIÔ Ø×&Ñ&Ô(Ø�M‰MŒOØ!*×!8Ñ!8ˆDÕä�t×)Ñ)Ó*×3Ñ3°L×AÑAÐAÐAÜ˜×*Ñ*¨JÓ7×>Ñ>×@Ñ@Ð@Ñ@rB   c                óô   • U R                   nUR                  (       d  g [        U R                  U R                  R                  SS5      5      R                  5       n[        X1X$5      nUR                  5         g )NrS   Ú.)	r`   Únamespace_packagesr   rY   rd   ÚgetÚresolveÚ_NamespaceInstallerÚinstall_namespaces)r[   Úinstallation_dirÚ
pth_prefixr_   ra   Ú	installers         r?   Ú_install_namespacesÚ"editable_wheel._install_namespaces¤   s_   € à× Ñ ˆØ×&×&Øä˜×(Ñ(¨$×*:Ñ*:×*>Ñ*>¸rÀ3Ó*GÓH×PÑPÓRˆÜ'¨À
ÓUˆ	Ø×$Ñ$Õ&rB   c                óÌ   • U R                   (       a  [        U R                   5      R                  O	[        5       n[        [        UR                  S5      5      n[        US 5      $ )Nz
*.egg-info)rX   r   ÚparentÚmapr   ÚglobÚnext)r[   Ú
parent_dirÚ
candidatess      r?   Ú_find_egg_info_dirÚ!editable_wheel._find_egg_info_dir®   sH   € Ø8<×8J×8J”T˜$×,Ñ,Ó-×4Ò4ÔPTÓPVˆ
Üœ˜jŸo™o¨lÓ;Ó<ˆ
Ü�J Ó%Ð%rB   c                ó´  • U R                   n[        U5      n[        U5      n[        [        X! S3S5      5      n[        [        X! S3S5      5      n[        [        X! S3S5      5      n	[        [        UR                  SSS95      n
[        U5      U
l        SU
l        [        [        UR                  SSS95      n[        [        UR                  S	SS95      nU=Ul
        =Ul        Ul        U=Ul        =Ul        Ul        U	=Ul        Ul        XŒl        X|l        UR)                  S
5      nSUl        [        [,        UR)                  S5      5      nSUl        [        U5      Ul        [        [2        UR)                  S5      5      nSUl        U R7                  5       Ul        U R;                  5         UR=                  5         UR=                  5         g)a´  Configure commands to behave in the following ways:

- Build commands can write to ``build_lib`` if they really want to...
  (but this folder is expected to be ignored and modules are expected to live
  in the project directory...)
- Binary extensions should be built in-place (editable_mode = True)
- Data/header/script files are not part of the "editable" specification
  so they are written directly to the unpacked_wheel directory.
z.dataÚdataÚheadersÚscriptsr&   T)Úreinit_subcommandsr#   r'   Úbuild_scriptsÚpythonr(   r$   FN)r`   r   r   r   Úegg_info_clsrn   Úegg_baseÚignore_egg_info_in_manifestÚ	build_clsÚinstall_clsÚbuild_platlibÚbuild_purelibÚ	build_libÚinstall_purelibÚinstall_platlibÚinstall_libr(   r�   Úinstall_headersÚinstall_dataÚget_command_objÚ
executableÚinstall_scripts_clsÚno_epÚ
build_tempÚbuild_py_clsÚcompiler–   Úexisting_egg_info_dirÚ_set_editable_moder~   )r[   rs   Úunpacked_wheelr¦   Útmp_dirr_   Úwheelr™   rš   r›   r&   r#   r'   r�   r(   r$   s                   r?   Ú_configure_buildÚeditable_wheel._configure_build³   sÎ  € ð × Ñ ˆÜ�NÓ#ˆÜ˜	“Nˆ	Ü”4˜¨&°¨¸Ó?Ó@ˆÜ”d˜>¨V°5¨>¸9ÓEÓFˆÜ”d˜>¨V°5¨>¸9ÓEÓFˆô Ü˜$×3Ñ3°JÐSWÐ3ÐXó
ˆô   ›LˆÔØ/3ˆÔ,äÜ�t×0Ñ0°ÈTÐ0ÐRó
ˆô Ü˜×2Ñ2°9ÐQUÐ2ÐVó
ˆð GPÐOˆÔÐO˜eÔ1°E´OØRWÐWˆÔÐW 'Ô"9¸GÔ<OØ8?Ð?ˆÔ %Ô"5Ø")ÔØ#Ôð ×,Ñ,¨_Ó=ˆØ#+ˆÔ äÜ ×!5Ñ!5Ð6GÓ!Hó
ˆð !%ˆÔä˜w›<ˆÔäœ d×&:Ñ&:¸:Ó&FÓGˆØ ˆÔØ)-×)@Ñ)@Ó)BˆÔ&à×ÑÔ!à×ÑÔ Ø× Ñ Õ"rB   c                óö   • U R                   nUR                  S5      nUR                  5        HH  nUR                  U5      n[        US5      (       a	  SUl        M.  [        US5      (       d  MA  SUl        MJ     g)z8Set the ``editable_mode`` flag in the build sub-commandsr#   Úeditable_modeTÚinplaceN)r`   r¬   Úget_sub_commandsÚhasattrr»   r¼   )r[   r_   r#   Úcmd_nameÚcmds        r?   r´   Ú!editable_wheel._set_editable_modeò   si   € à× Ñ ˆØ×$Ñ$ WÓ-ˆØ×.Ñ.Ö0ˆHØ×&Ñ& xÓ0ˆCÜ�s˜O×,Ñ,Ø$(�Ö!Ü˜˜i×(Ó(Ø"�–ò 1rB   c                ój  • / n0 nU R                  S5      nUR                  5        Hˆ  nU R                  U5      n[        US5      (       a(  UR                  UR	                  5       =(       d    / 5        [        US5      (       d  M`  UR                  UR                  5       =(       d    0 5        MŠ     X4$ )Nr#   Úget_outputsÚget_output_mapping)ro   r½   r¾   ÚextendrÃ   ÚupdaterÄ   )r[   ÚfilesÚmappingr#   r¿   rÀ   s         r?   Ú_collect_build_outputsÚ%editable_wheel._collect_build_outputsý   s–   € ØˆØ"$ˆØ×*Ñ*¨7Ó3ˆà×.Ñ.Ö0ˆHØ×,Ñ,¨XÓ6ˆCÜ�s˜M×*Ñ*Ø—‘˜SŸ_™_Ó.×4°"Ô5Ü�sÐ0×1Ó1Ø—‘˜s×5Ñ5Ó7×=¸2Ö>ñ 1ð ˆ~ÐrB   c                óÖ   • U R                  XX45        U R                  5         U R                  5       u  pVU R                  S5        U R                  S5        U R                  S5        XV4$ )Nrš   r›   r™   )r¸   Ú_run_build_subcommandsrÉ   Ú_run_install)r[   Ú	dist_namerµ   r¦   r¶   rÇ   rÈ   s          r?   Ú_run_build_commandsÚ"editable_wheel._run_build_commands  sb   € ð 	×Ñ˜i¸ÔLØ×#Ñ#Ô%Ø×4Ñ4Ó6‰ˆØ×Ñ˜)Ô$Ø×Ñ˜)Ô$Ø×Ñ˜&Ô!Øˆ~ÐrB   c                óî   • U R                  S5      nUR                  5        HP  nU R                  U5      nUS:X  a%  [        U5      [        La  U R	                  U5        M?  U R                  U5        MR     g)aE  
Issue #3501 indicates that some plugins/customizations might rely on:

1. ``build_py`` not running
2. ``build_py`` always copying files to ``build_lib``

However both these assumptions may be false in editable_wheel.
This method implements a temporary workaround to support the ecosystem
while the implementations catch up.
r#   r$   N)ro   r½   Útyper±   Ú_safely_runÚrun_command)r[   r#   rs   rÀ   s       r?   rÌ   Ú%editable_wheel._run_build_subcommands  sf   € ð ×*Ñ*¨7Ó3ˆØ×*Ñ*Ö,ˆDØ×,Ñ,¨TÓ2ˆCØ�zÓ!¤d¨3£i´|Ò&CØ× Ñ  Ö&à× Ñ  Ö&ò -rB   c                ó®   •  U R                  U5      $ ! [         a7    [        R                  " SS[        R
                  " 5        SU SU S35         g f = f)Nz0Customization incompatible with editable installz
                zŒ

                If you are seeing this warning it is very likely that a setuptools
                plugin or customization overrides the `a  ` command, without
                taking into consideration how editable installs run build steps
                starting from setuptools v64.0.0.

                Plugin authors and developers relying on custom build steps are
                encouraged to update their `aa  ` implementation considering the
                information about editable installs in
                https://setuptools.pypa.io/en/latest/userguide/extension.html.

                For the time being `setuptools` will silence this error and ignore
                the faulty command, but this behavior will change in future versions.
                )rÔ   rr   r!   r;   Ú	tracebackÚ
format_exc)r[   r¿   s     r?   rÓ   Úeditable_wheel._safely_run0  sp   € ð	Ø×#Ñ# HÓ-Ð-øÜó 	Ü(×-Ò-ØBðÜ×%Ò%Ó'Ð(ð )8ð 9A°zð B-ð
 .6¨Jð 7ðöð	ús   ‚ “>AÁAc           
     ó®  • SSK Jn  U R                  S5      nUR                  nSR	                  UR                  5       5      nSnU SU SU S3n[        U R                  U5      nUR                  5       (       a  UR                  5         [        US9n	[        SS9n
[        S	S9nU	 oÊ oÛ n[        U[        U R                  5      R                  5      n[        R                  " U R                  U5        U R                  XÄ5        U R                  XLXÞ5      u  nnU R!                  XEU5      nU   U" US
5       nU" UUU5        UR#                  U5        S S S 5        S S S 5        S S S 5        S S S 5        S S S 5        U$ ! , (       d  f       N0= f! , (       d  f       N9= f! , (       d  f       NB= f! , (       d  f       NK= f! , (       d  f       U$ = f)Nr   r*   r%   Ú-z
0.editablez.whl)Úsuffixz
.build-libz.build-tempÚw)Úwheel.wheelfiler+   ro   rs   rf   Úget_tagr   rW   r�   Úunlinkr   rX   ÚshutilÚcopytreer�   rÏ   Ú_select_strategyÚwrite_files)r[   rk   r+   r%   rÎ   ÚtagÚ	build_tagÚarchive_nameÚ
wheel_pathrµ   r¦   Ú	build_tmpÚunpackedÚlibÚtmpÚunpacked_dist_inforÇ   rÈ   ÚstrategyÚ	wheel_objs                       r?   rq   Ú!editable_wheel._create_wheel_fileL  s{  € Ý-à×.Ñ.¨{Ó;ˆ	Ø—N‘Nˆ	Ø�h‰h�{×*Ñ*Ó,Ó-ˆØ ˆ	Ø#˜ A i [°°#°°dÐ;ˆÜ˜$Ÿ-™-¨Ó6ˆ
Ø×Ñ×ÑØ×ÑÔä+°<Ñ@ˆÜ&¨lÑ;ˆ	Ü&¨mÑ<ˆ	á˜x¨°c¸9ÈÜ!% h´°T×5GÑ5GÓ0H×0MÑ0MÓ!NÐÜ�OŠO˜D×.Ñ.Ð0BÔCØ×$Ñ$ XÔ9Ø!×5Ñ5°iÈ3ÓT‰NˆE�7Ø×,Ñ,¨Y¸SÓAˆHÚ™9 Z°Ô5¸Ù˜ E¨7Ô3Ø×%Ñ% hÔ/÷ 6—÷ <E¯�^ð Ð÷	 6Õ5ú—•ú÷ <E½9ú¯­ú�^Œ^ð Ðúsm   Â(GÂ*F4Â,BF#Ä1
F	Ä;FÅF	ÅF#Å'F4Å/GÆ
FÆF	Æ
F ÆF#Æ#
F1Æ-F4Æ4
G	Æ>GÇ
Gc                ó¼   • [        U R                  SU 3S 5      nU(       a;  U" 5       (       a.  [        R                  SU S35        U R	                  SU 35        g g g )NÚhas_zInstalling z as non editableÚinstall_)Úgetattrr`   Ú_loggerÚinforÔ   )r[   ÚcategoryÚhas_categorys      r?   rÍ   Úeditable_wheel._run_installh  sX   € Ü˜t×0Ñ0°D¸¸
Ð2CÀTÓJˆÞ™LŸN™NÜ�L‰L˜; x jÐ0@ÐAÔBØ×Ñ˜x¨ zÐ2Õ3ð +ˆ<rB   c                ó~  • SU SU 3n[        U R                  5      n[        R                  U R                  5      nU[        R
                  L a7  [        [        U R                  SU5      5      n[        U R                  XU5      $ [        U R                  5      n[        X€R                  U5      n	U[        R                  L n
[        U R                  5      S1:X  a  U	(       d  U
(       a=  U R                  R                  SS5      n[        U R                  U[        X[5      /5      $ [!        U R                  U5      $ )zDDecides which strategy to use to implement an editable installation.ú__editable__.rÛ   r#   rS   r„   )r   rY   r/   r@   r=   rK   Ú
_empty_dirÚ	_LinkTreer`   Ú_find_packagesÚ_simple_layoutrd   r5   Úsetr†   Ú
_StaticPthÚ_TopLevelFinder)r[   rs   rå   r¦   Ú
build_namerY   r=   Úauxiliary_dirÚpackagesÚhas_simple_layoutÚis_compat_modeÚsrc_dirs               r?   rã   Úeditable_wheel._select_strategyn  s  € ð % T F¨!¨C¨5Ð1ˆ
Ü˜4×+Ñ+Ó,ˆÜ×$Ñ$ T§Y¡YÓ/ˆà”=×'Ñ'Ò'Ü&¤t¨D×,<Ñ,<¸gÀzÓ'RÓSˆMÜ˜T×.Ñ.°ÀYÓOÐOä! $×"3Ñ"3Ó4ˆÜ*¨8×5EÑ5EÀ{ÓSÐØ¤×!5Ñ!5Ð5ˆÜˆt×ÑÓ  R DÓ(Ö->Æ.à×&Ñ&×*Ñ*¨2¨sÓ3ˆGÜ˜d×/Ñ/°¼¸[Ó8RÐ7SÓTÐTô ˜t×0Ñ0°$Ó7Ð7rB   )rW   rX   r=   rd   rY   ©rE   ÚNone)rE   rD   )rs   r   rµ   r   r¦   r   r¶   r   )rE   ú tuple[list[str], dict[str, str]])
rÎ   r   rµ   r   r¦   r   r¶   r   rE   r  )r¿   r   )r÷   r   )rs   r   rå   r   r¦   r   rE   ÚEditableStrategy)rF   rG   rH   rI   rJ   Údescriptionr	   r/   rT   Ú__annotations__r\   rg   rx   rm   r�   r–   r¸   r´   rÉ   rÏ   rÌ   rÓ   rq   rÍ   rã   rM   rC   rB   r?   rO   rO   h   s
  ‡ ñð
 W€Kð
 	LØKØ	�$™ ×!6Ñ!6×!<¸"Ó=Ð>ð	ð ð ó òôVôò*	Aò'ô&ð
=#Øð=#Ø)0ð=#Ø=Dð=#ØOVô=#ò~	#ôðàðð  ðð ð	ð
 ðð 
*ôô'ô,ò8ô84ð8àð8ð ð8ð ð	8ð
 
÷8rB   rO   c                  óR   • \ rS rSr        SS jrSS jr        S	S jrSrg)
r  i‰  c                ó   • g rV   rC   )r[   r·   rÇ   rÈ   s       r?   Ú__call__ÚEditableStrategy.__call__Š  s   € àrB   c                ó   • g rV   rC   rZ   s    r?   Ú	__enter__ÚEditableStrategy.__enter__�  s   €  rB   c                ó   • g rV   rC   ©r[   Ú	_exc_typeÚ
_exc_valueÚ
_tracebacks       r?   Ú__exit__ÚEditableStrategy.__exit__Ž  s   € ð
 rB   rC   N)r·   r+   rÇ   ú	list[str]rÈ   úMapping[str, str]rE   Úobject©rE   r)   )r  ztype[BaseException] | Noner  zBaseException | Noner  zTracebackType | NonerE   r   )rF   rG   rH   rI   r  r  r  rM   rC   rB   r?   r  r  ‰  sW   † ðØðØ'0ðØ;Lðà	ôô %ðà-ðð )ðð )ð	ð
 
÷rB   r  c                  ó\   • \ rS rSrSS jr        S	S jrS
S jr        SS jrSrg)r  i–  c                ó(   • Xl         X l        X0l        g rV   ©r_   rs   Úpath_entries)r[   r_   rs   r%  s       r?   Ú__init__Ú_StaticPth.__init__—  s   € ØŒ	ØŒ	Ø(ÕrB   c                ó¤   • SR                  S U R                   5       5      n[        U S35      nUR                  SU R                   S3U5        g )NÚ
c              3  óT   #   • U  H  n[        UR                  5       5      v •  M      g 7frV   )r   r‡   )Ú.0Úps     r?   Ú	<genexpr>Ú&_StaticPth.__call__.<locals>.<genexpr>Ÿ  s    é € ÐHÒ6G°œC §	¡	£×,Ð,Ò6Gùs   ‚&(rû   ú.pth)rf   r%  Ú_encode_pthÚwritestrrs   )r[   r·   rÇ   rÈ   ÚentriesÚcontentss         r?   r  Ú_StaticPth.__call__œ  sI   € ð —)‘)ÑH°d×6GÒ6GÓHÓHˆÜ ' ¨"˜~Ó.ˆØ�‰˜ t§y¡y k°Ð6¸ÕArB   c                ó¢   • S[        [        [        R                  U R                  5      5      < S3n[
        R                  U[        -   5        U $ )Nz_
        Editable install will be performed using .pth file to extend `sys.path` with:
        z	
        )Úlistr‘   rb   Úfspathr%  rõ   ÚwarningÚ_LENIENT_WARNING©r[   Úmsgs     r?   r  Ú_StaticPth.__enter__£  sH   € ð	ä	Œc”"—)‘)˜T×.Ñ.Ó/Ó	0Ñ3ð 4	ðˆô 	�‰˜Ô.Ñ.Ô/ØˆrB   c                ó   • g rV   rC   r  s       r?   r  Ú_StaticPth.__exit__«  s   € ð 	rB   r$  N)r_   r   rs   r   r%  z
list[Path]rE   r  ©r·   r+   rÇ   r  rÈ   r  rE   r  r!  ©r  r   r  r   r  r   rE   r  )	rF   rG   rH   rI   r&  r  r  r  rM   rC   rB   r?   r  r  –  sa   † ô)ð
BØðBØ'0ðBØ;LðBà	ôBôðàðð ðð ð	ð
 
÷rB   r  c                  óª   ^ • \ rS rSrSr          SU 4S jjr        SU 4S jjrSS jrSSS jjrSS jr	SS jr
        SS	 jrS
rU =r$ )rý   i´  aH  
Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``.

This strategy will only link files (not dirs), so it can be implemented in
any OS, even if that means using hardlinks instead of symlinks.

By collocating ``auxiliary_dir`` and the original source code, limitations
with hardlinks should be avoided.
c                óØ   >• [        U5      U l        [        U5      R                  5       U l        UR	                  S5      R
                  U l        [        TU ]!  XU R                  /5        g )Nr$   )	r   r  r‡   r¦   r¬   Ú	copy_fileÚ_fileÚsuperr&  )r[   r_   rs   r  r¦   Ú	__class__s        €r?   r&  Ú_LinkTree.__init__¿  sV   ø€ ô " -Ó0ˆÔÜ˜i›×0Ñ0Ó2ˆŒØ×)Ñ)¨*Ó5×?Ñ?ˆŒ
Ü‰Ñ˜ d×&8Ñ&8Ð%9Õ:rB   c                óH   >• U R                  X#5        [        TU ]	  XU5        g rV   )Ú_create_linksrE  r  )r[   r·   rÇ   rÈ   rF  s       €r?   r  Ú_LinkTree.__call__Ë  s"   ø€ ð 	×Ñ˜5Ô*Ü‰Ñ˜ wÕ/rB   c                ó  • [        [        5         [        U5      R                  5       R	                  U R
                  5      n[        U5      R                  [        R                  S5      sS S S 5        $ ! , (       d  f       g = f)NÚ/)
r   Ú
ValueErrorr   r‡   Úrelative_tor¦   r   Úreplacerb   Úsep)r[   Úfilere   s      r?   Ú_normalize_outputÚ_LinkTree._normalize_outputÑ  sT   € ä”jÕ!Ü˜“:×%Ñ%Ó'×3Ñ3°D·N±NÓCˆDÜ�t“9×$Ñ$¤R§V¡V¨SÓ1÷ "×!Ö!ð ús   �AA5Á5
Bc                ó²   • U R                   U-  nUR                  R                  5       (       d  UR                  R                  SS9  U R	                  X$US9  g )NT)Úparents©Úlink)r  r�   Úis_dirrl   rD  )r[   Úrelative_outputÚsrc_filerW  Údests        r?   Ú_create_fileÚ_LinkTree._create_fileØ  sJ   € Ø×!Ñ! OÑ3ˆØ�{‰{×!Ñ!×#Ñ#Ø�K‰K×Ñ dÐÑ+Ø�
‰
�8¨ˆ
Ò-rB   c                ó´  ^ • T R                   R                  SSS9  [        T R                   5      (       a  SOSnU 4S jUR                  5        5       nU VVs0 s H  u  pVUc  M
  XV_M     nnnU H5  nT R	                  U5      n	U	(       d  M  X—;  d  M$  T R                  X˜5        M7     UR                  5        H  u  pšT R                  XšUS9  M     g s  snnf )NT)rU  rj   ÚsymÚhardc              3  óN   >#   • U  H  u  pTR                  U5      U4v •  M     g 7frV   )rR  )r+  ÚkÚvr[   s      €r?   r-  Ú*_LinkTree._create_links.<locals>.<genexpr>á  s%   øé € ÐXÒAW¹¸�t×-Ñ-¨aÓ0°!Õ4ÒAWùs   ƒ"%rV  )r  rl   Ú_can_symlink_filesÚitemsrR  r\  )r[   ÚoutputsÚoutput_mappingÚ	link_typeÚ
normalisedrb  rc  ÚmappingsÚoutputÚrelativeÚsrcs   `          r?   rI  Ú_LinkTree._create_linksÞ  sÂ   ø€ Ø×Ñ× Ñ ¨¸Ð Ñ=Ü/°×0BÑ0B×CÑC‘EÈˆ	ÜXÀ×AUÑAUÔAWÓXˆ
á%/ÔA¢Z™T˜Q°1“D�A’D¡ZˆÑAãˆFØ×-Ñ-¨fÓ5ˆHßˆx˜HÕ4Ø×!Ñ! (Ö3ñ ð
 &Ÿ^™^Ö-‰MˆHØ×Ñ˜h°)ÐÓ<ò .ùó Bs   Á	CÁ&Cc                óB   • Sn[         R                  U[        -   5        U $ )Nz=Strict editable install will be performed using a link tree.
)rõ   r8  Ú_STRICT_WARNINGr:  s     r?   r  Ú_LinkTree.__enter__í  s   € ØNˆÜ�‰˜œoÑ-Ô.ØˆrB   c                óR   • SU R                    S3n[        R                  " SU5        g )Nz\

        Strict editable installation performed using the auxiliary directory:
            z†

        Please be careful to not remove this directory, otherwise you might not be able
        to import/use your package.
        úEditable installation.)r  r    r;   ©r[   r  r  r  r;  s        r?   r  Ú_LinkTree.__exit__ò  s2   € ðà×ÑÐ ð !	ðˆô 	×ÒÐ5°sÕ;rB   )rD  r  r¦   )
r_   r   rs   r   r  r   r¦   r   rE   r  r?  )rQ  r   rE   rD   rV   )rY  r   rZ  r   )rh  r  r!  r@  )rF   rG   rH   rI   rJ   r&  r  rR  r\  rI  r  r  rM   Ú__classcell__)rF  s   @r?   rý   rý   ´  s¦   ø† ñð
;àð
;ð ð
;ð ð	
;ð
 ð
;ð 
÷
;ð0Øð0Ø'0ð0Ø;Lð0à	÷0ôö.ô=ôð
<àð<ð ð<ð ð	<ð
 
÷<ò <rB   rý   c                  óp   • \ rS rSrS
S jrSS jrSS jr        SS jrSS jr        SS jr	Sr
g	)r  i  c                ó   • Xl         X l        g rV   ©r_   rs   )r[   r_   rs   s      r?   r&  Ú_TopLevelFinder.__init__  s   € ØŒ	Ø�	rB   c           
     óÆ  • U R                   R                  =(       d    [        R                  n[	        [        U R                   5      [        U R                   5      5      nU R                   R                  =(       d    0 n[        X#U5      n[        [	        [        U R                   R                  =(       d    / U5      S [        U5       5       5      5      nU R                   R                  =(       d    /  Vs0 s H-  nU[        XdU R                   R                  =(       d    S5      _M/     nn0 UEUEnSU R                   S3n	[         R"                  " U	5      n
X©X…4$ s  snf )Nc              3  ó(   #   • U  H  o/ 4v •  M
     g 7frV   rC   )r+  Únss     r?   r-  Ú0_TopLevelFinder.template_vars.<locals>.<genexpr>  s   é € ÐDÒ$C˜b�b•Ò$Cùs   ‚rS   rû   z.finder)r_   ra   rb   rc   r
   rþ   Ú_find_top_level_modulesrd   Ú_find_package_rootsÚdictÚ_find_namespacesr  Ú_find_virtual_namespacesr…   r   rs   r   Úsafe_identifier)r[   ra   Ú	top_levelrd   ÚrootsÚnamespaces_ÚpkgÚlegacy_namespacesrÈ   rs   Úfinders              r?   Útemplate_varsÚ_TopLevelFinder.template_vars  s(  € Ø—9‘9×%Ñ%×2¬¯©ˆÜœ.¨¯©Ó3Ô5LÈTÏYÉYÓ5WÓXˆ	Ø—i‘i×+Ñ+×1¨rˆÜ# I¸HÓEˆäÜÜ  §¡×!3Ñ!3×!9°r¸5ÓAÙDÔ$<¸UÔ$CÓDóó
ˆð —y‘y×3Ñ3×9°rÐ9ó
â9�ð Ô" 3¨t¯y©y×/AÑ/A×/GÀRÓHÒHÙ9ð 	ð 
ð
 1�UÐ0Ð/Ð0ˆð
 ˜tŸy™y˜k¨Ð1ˆÜ×/Ò/°Ó5ˆØ˜WÐ1Ð1ùò
s   Ã84Ec              #  ó¼   #   • U R                  5       u  pp4[        [        X#U5      S5      nU S3U4v •  [        SU SU S35      nSU R                   S3U4v •  g 7f)Núutf-8z.pyzimport z; z
.install()rû   r/  )rŒ  ÚbytesÚ_finder_templater0  rs   )r[   r‹  rs   rÈ   rˆ  Úcontents         r?   Úget_implementationÚ"_TopLevelFinder.get_implementation"  sn   é € Ø-1×-?Ñ-?Ó-AÑ*ˆ�gäÔ(¨¸ÓDÀgÓNˆØ�˜ˆ~˜wÐ'Ò'ä ¨ x¨r°&°¸ÐDÓEˆØ˜tŸy™y˜k¨Ð.°Ð8Ó8ùs   ‚AAc                óX   • U R                  5        H  u  pEUR                  XE5        M     g rV   )r“  r1  )r[   r·   rÇ   rÈ   rQ  r’  s         r?   r  Ú_TopLevelFinder.__call__+  s%   € ð "×4Ñ4Ö6‰MˆDØ�N‰N˜4Ö)ò 7rB   c                óB   • Sn[         R                  U[        -   5        U $ )Nz=Editable install will be performed using a meta path finder.
)rõ   r8  r9  r:  s     r?   r  Ú_TopLevelFinder.__enter__1  s   € ØNˆÜ�‰˜Ô.Ñ.Ô/ØˆrB   c                ó6   • Sn[         R                  " SU5        g )Nz¢

        Please be careful with folders in your working directory with the same
        name as your package as they may take precedence during imports.
        rt  )r    r;   ru  s        r?   r  Ú_TopLevelFinder.__exit__6  s   € ðˆô 	×ÒÐ5°sÕ;rB   rz  N)r_   r   rs   r   rE   r  )rE   z5tuple[str, str, dict[str, str], dict[str, list[str]]])rE   zIterator[tuple[str, bytes]]r?  r!  r@  )rF   rG   rH   rI   r&  rŒ  r“  r  r  r  rM   rC   rB   r?   r  r    sf   † ôô2ô69ð*Øð*Ø'0ð*Ø;Lð*à	ô*ôð

<àð
<ð ð
<ð ð	
<ð
 
÷
<rB   r  c                ó,  • [         R                  " 5        n[         R                  " U[        R                  S9nUR                  U 5        UR                  5         UR                  S5        UR                  5       sSSS5        $ ! , (       d  f       g= f)al  
Prior to Python 3.13 (see https://github.com/python/cpython/issues/77102),
.pth files are always read with 'locale' encoding, the recommendation
from the cpython core developers is to write them as ``open(path, "w")``
and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
This function tries to simulate this behavior without having to create an
actual file, in a way that supports a range of active Python versions.
(There seems to be some variety in the way different version of Python handle
``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``
or ``locale.getencoding()``).
©Úencodingr   N)	ÚioÚBytesIOÚTextIOWrapperr   ÚPTH_ENCODINGÚwriteÚflushÚseekÚread)r’  ÚbufferÚwrappers      r?   r0  r0  C  sZ   € ô 
�ŠŒ˜Ü×"Ò" 6´E×4FÑ4FÑGˆà�‰�gÔØ�‰ŒØ�‰�AŒØ�{‰{‹}÷ 
��ús   –A%BÂ
Bc                ó<  • [        [        U R                  5       5      S9 n[        US5      [        US5      p2UR	                  SSS9  [        [        [        [        5         [        R                  " X#5        UR                  5       (       a%  UR                  SS9S:X  a   S S S 5        S S S 5        gS S S 5         [        R                  " X#5         S S S 5        g	! , (       d  f       N/= f! [         a  nSn[        U5      UeS nAff = f! , (       d  f       g = f)
N)Údirz	file1.txtz	file2.txtÚfile1r�  rœ  Tz�File system does not seem to support either symlinks or hard links. Strict editable installs require one of them to be supported.F)r   r   r‡   r   Ú
write_textr   ÚAttributeErrorÚNotImplementedErrorÚOSErrorrb   ÚsymlinkÚ
is_symlinkÚ	read_textrW  rr   ÚLinksNotSupported)Úbase_dirrì   Úpath1Úpath2rv   r;  s         r?   re  re  X  sï   € Ü	¤ H×$4Ñ$4Ó$6Ó 7Ò	8¸CÜ˜C Ó-¬t°C¸Ó/EˆuØ×Ñ˜¨7ÐÑ3Ü”nÔ&9¼7ÕCÜ�JŠJ�uÔ$Ø×Ñ×!Ñ! e§o¡o¸w oÐ&GÈ7Ó&RØ÷ D÷ 
9Ð	8÷ Dð
	1Ü�GŠG�EÔ!ð ÷! 
9Ð	8÷ DÕCûô ó 	1ðPð ô $ CÓ(¨bÐ0ûð	1ú÷ 
9Õ	8úsO   ¡ADÁ"A CÂ"DÂ3DÂ<C-ÃDÃ
C*	Ã&DÃ-
D
Ã7DÄD
Ä
DÄ
Dc           	     ó2  ^• U  Vs0 s H  o3[        X1U5      _M     nnU(       d  [        U5      0 S14;   $ [        R                  R	                  [        [        UR                  5       5      5      m[        U4S jUR                  5        5       5      $ s  snf )aó  Return ``True`` if:
- all packages are contained by the same parent directory, **and**
- all packages become importable if the parent directory is added to ``sys.path``.

>>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj")
True
>>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj")
True
>>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj")
True
>>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj")
True
>>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".")
True
>>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".")
False
>>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj")
False
>>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".")
False
>>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj")
False
>>> # Special cases, no packages yet:
>>> _simple_layout([], {"": "src"}, "/tmp/myproj")
True
>>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj")
False
rS   c           	   3  óˆ   >#   • U  H7  u  p[         R                  " [        T/UR                  S 5      Q76 U5      v •  M9     g7f©r„   N)r   Ú	same_pathr   Úsplit)r+  ÚkeyÚvaluer�   s      €r?   r-  Ú!_simple_layout.<locals>.<genexpr>�  s:   øé € ð â(‰JˆCô 	�Šœ˜VÐ5 c§i¡i°£nÒ5°u×=Ð=Ú(ùs   ƒ?A)	r   r   rb   re   Ú
commonpathr   Ú_parent_pathrf  Úall)r  rd   rY   r‰  Úlayoutr�   s        @r?   rÿ   rÿ   l  s†   ø€ ñ> PXÓXÊxÈÔ$ S°{ÓCÒCÉx€FÐXÞÜ�;Ó B¨¨ :Ñ-Ð-Ü�W‰W×Ñ¤¬°f·l±l³nÓ EÓF€FÜô à Ÿ,™,œ.óó ð ùò	 Ys   †Bc                óh   • UR                  U 5      nUR                  S[        R                  -   5      $ )a  Infer the parent path containing a package, that if added to ``sys.path`` would
allow importing that package.
When ``pkg`` is directly mapped into a directory with a different name, return its
own path.
>>> _parent_path("a", "src/a")
'src'
>>> _parent_path("b", "src/c")
'src/c'
rL  )ÚremovesuffixÚrstriprb   rP  )r‰  Úpkg_pathr�   s      r?   r¿  r¿  •  s+   € ð ×"Ñ" 3Ó'€FØ�=‰=˜œrŸv™v™Ó&Ð&rB   c              #  óÞ  #   • [        U R                  =(       d    / 5       S h  v•N   U R                  =(       d    / nU Vs/ s H  nSU;   d  M  UPM     nnU R                  (       a  U R                  v •  OFU R                  =(       d    / nX4 Vs/ s H!  nSUR
                  ;   d  M  UR
                  PM#     sn-  nU H  nUR                  S5      u  n  nUv •  M     g  N¼s  snf s  snf 7f)Nr„   )Úiterr  Ú
py_modulesÚext_packageÚext_modulesrs   Ú
rpartition)	r_   rÈ  ÚmodÚnested_modulesrÊ  ÚxÚmoduleÚpackageÚ_s	            r?   rþ   rþ   £  sÇ   é € Ü�D—M‘M×' RÓ(×(Ð(à—‘×& B€JÙ%/Ó>¢Z˜c°3¸#±:—c¡Z€NÐ>Ø××Ø×ÑÓà×&Ñ&×,¨"ˆØ¨;ÓHª; a¸#ÀÇÁ¹-›6˜1Ÿ6œ6©;ÑHÑHˆã ˆØ×)Ñ)¨#Ó.‰ˆ��AØŒò !ñ )ùò ?ùò
 Iùs9   ‚"C-¤C!¥C-Á
C#ÁC#Á;C-ÂC(Â)C(Â9)C-Ã#
C-c              #  óÐ   #   • U R                   =(       d    / nS U 5        S h  v•N   U R                  (       d'  U R                  =(       d    / nS U 5        S h  v•N   g g  N= N7f)Nc              3  ó6   #   • U  H  nS U;  d  M  Uv •  M     g7fr¸  rC   )r+  rÌ  s     r?   r-  Ú*_find_top_level_modules.<locals>.<genexpr>µ  s   é € Ð<šz˜¨S¸©^—‘šzùs   ‚
�	c              3  ó^   #   • U  H#  nS UR                   ;  d  M  UR                   v •  M%     g7fr¸  )rs   )r+  rÎ  s     r?   r-  rÔ  ¹  s!   é € ÐE¢K˜q°3¸a¿f¹fÑ3D“F�A—F–F¢Kùs   ‚-š-)rÈ  rÉ  rÊ  )r_   rÈ  rÊ  s      r?   r€  r€  ³  sX   é € Ø—‘×& B€JÙ<™zÓ<×<Ð<à××Ø×&Ñ&×,¨"ˆÙE¡KÓE×EÑEð ñ =ñ 	Fùs!   ‚"A&¤A"¥6A&ÁA$ÁA&Á$A&c                ó€   • [        U 5       Vs0 s H  nU[        [        X1U5      5      _M     nn[        U5      $ s  snf rV   )ÚsortedÚ_absolute_rootr   Ú_remove_nested)r  rd   ra   r‰  Ú	pkg_rootss        r?   r�  r�  ¼  sM   € ô ˜(Ô#ó!â#ˆCð 	Œ^Ô-¨cÀÓIÓJÒJÙ#ð ð !ô
 ˜)Ó$Ð$ùò!s   Ž ;c                óØ   • [        U 5      nUR                  nUR                  5       (       a  [        UR	                  5       5      $ [        UR	                  5       UR
                  -  5      $ )z(Works for packages and top-level modules)r   r�   r�   r   r‡   rs   )re   Úpath_r�   s      r?   rØ  rØ  É  sK   € ä�‹J€EØ�\‰\€Fà‡|�|‡~�~Ü�5—=‘=“?Ó#Ð#ä�6—>‘>Ó# e§j¡jÑ0Ó1Ð1rB   c           	   #  ó"  #   • U  H…  nSU;  a  M  UR                  S5      n[        [        U5      S-
  SS5       HL  nSR                  USU 5      n[	        [        X@S5      5      nUR                  5       (       a  X@;  d  MH  Uv •  MN     M‡     g7f)a  By carefully designing ``package_dir``, it is possible to implement the logical
structure of PEP 420 in a package without the corresponding directories.

Moreover a parent package can be purposefully/accidentally skipped in the discovery
phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included
by ``mypkg`` itself is not).
We consider this case to also be a virtual namespace (ignoring the original
directory) to emulate a non-editable installation.

This function will try to find these kinds of namespaces.
r„   r"   r   éÿÿÿÿNrS   )rº  ÚrangeÚlenrf   r   r   r�   )rÚ  r‰  ÚpartsÚiÚpartial_namere   s         r?   r„  r„  Ô  s   é € ó ˆØ�c‹>ÙØ—	‘	˜#“ˆÜ”s˜5“z A‘~ q¨"Ö-ˆAØŸ8™8 E¨"¨1 IÓ.ˆLÜÔ)¨,À2ÓFÓGˆDØ—;‘;—=‘= LÕ$Aà"Ô"ó .ò	 ùs   ‚A<BÂBc              #  óÄ   #   • U  HV  n[        X!S5      n[        U5      R                  5       (       d  M/  [        US5      R                  5       (       a  MP  X#/4v •  MX     g 7f)NrS   z__init__.py)r   r   r�   )r  rÚ  r‰  re   s       r?   rƒ  rƒ  ì  sO   é € ó ˆÜ  °Ó4ˆÜ�‹:×Ñ×Ó¤t¨D°-Ó'@×'GÑ'G×'IÓ'IØ˜�-Ôò ùs   ‚.A ´A ÁA c                ó  ^^• [        U R                  5       5      n[        [        U R	                  5       5      5       HB  u  mm[        UU4S jU R	                  5        5       5      (       d  M1  UR                  T5        MD     U$ )Nc              3  óZ   >#   • U  H   u  pTU:g  =(       a    [        TTX5      v •  M"     g 7frV   )Ú
_is_nested)r+  ÚotherÚ
other_pathre   r‰  s      €€r?   r-  Ú!_remove_nested.<locals>.<genexpr>ù  s0   øé € ð 
â%6Ñ!�ð �5‰L×EœZ¨¨T°5ÓEÔEÚ%6ùs   ƒ(+)r‚  ÚcopyÚreversedr6  rf  ÚanyÚpop)rÚ  rl  re   r‰  s     @@r?   rÙ  rÙ  õ  sh   ù€ Ü�)—.‘.Ó"Ó#€Fäœd 9§?¡?Ó#4Ó5Ö6‰	ˆˆTÜõ 
à%.§_¡_Ô%6ó
÷ 
ó 
ð �J‰J�sŽOñ 7ð €MrB   c                ó  • [         R                  " U5      nU R                  USS5      R                  S5      R	                  S5      nU R                  U5      =(       a#    U[         R                  " [        U/UQ76 5      :H  $ )au  
Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the
file system.
>>> _is_nested("a.b", "path/a/b", "a", "path/a")
True
>>> _is_nested("a.b", "path/a/b", "a", "otherpath/a")
False
>>> _is_nested("a.b", "path/a/b", "c", "path/c")
False
>>> _is_nested("a.a", "path/a/a", "a", "path/a")
True
>>> _is_nested("b.a", "path/b/a", "a", "path/a")
False
rS   r"   r„   )r   ÚnormpathrO  Ústriprº  Ú
startswithr   )r‰  rÅ  r�   Úparent_pathÚnorm_pkg_pathÚrests         r?   rç  rç    so   € ô —N’N 8Ó,€MØ�;‰;�v˜r 1Ó%×+Ñ+¨CÓ0×6Ñ6°sÓ;€DØ�>‰>˜&Ó!÷  m´u·~²~Üˆ[Ð ˜4Ò ó8ñ 'ð rB   c                ó\   • [         R                  " U SS9  [        R                  " U 5        U $ )zFCreate a directory ensured to be empty. Existing files may be removed.T)Úignore_errors)r   Úrmtreerb   Úmakedirs)Údir_s    r?   rü   rü     s!   € ä‡N‚N�4 tÒ,Ü‡K‚K�ÔØ€KrB   c                  ó*   • \ rS rSrSS jrS rS rSrg)rˆ   i  c                óB   • Xl         X@l        X l        X0l        / U l        g rV   )r`   ra   rŠ   Úeditable_namerg  )r[   r`   rŠ   rý  ra   s        r?   r&  Ú_NamespaceInstaller.__init__   s    € Ø(ÔØ ŒØ 0ÔØ*ÔØ"$ˆ�rB   c                ó„   • [         R                  R                  U R                  U R                  U R
                  -   5      $ )zInstallation target.)rb   re   rf   rŠ   rý  Ú	nspkg_extrZ   s    r?   Ú_get_nspkg_fileÚ#_NamespaceInstaller._get_nspkg_file'  s,   € ä�w‰w�|‰|˜D×1Ñ1°4×3EÑ3EÈÏÉÑ3VÓWÐWrB   c                ó>   • [        [        U R                  5      5      $ )z1Where the modules/packages should be loaded from.)Úreprr   ra   rZ   s    r?   Ú	_get_rootÚ_NamespaceInstaller._get_root+  s   € ä”C˜Ÿ™Ó&Ó'Ð'rB   )r`   rý  rŠ   rg  ra   Nr
  )rF   rG   rH   rI   r&  r  r  rM   rC   rB   r?   rˆ   rˆ     s   † ô%òXõ(rB   rˆ   a  from __future__ import annotations
import sys
from importlib.machinery import ModuleSpec, PathFinder
from importlib.machinery import all_suffixes as module_suffixes
from importlib.util import spec_from_file_location
from itertools import chain
from pathlib import Path

MAPPING: dict[str, str] = {mapping!r}
NAMESPACES: dict[str, list[str]] = {namespaces!r}
PATH_PLACEHOLDER = {name!r} + ".__path_hook__"


class _EditableFinder:  # MetaPathFinder
    @classmethod
    def find_spec(cls, fullname: str, path=None, target=None) -> ModuleSpec | None:  # type: ignore
        # Top-level packages and modules (we know these exist in the FS)
        if fullname in MAPPING:
            pkg_path = MAPPING[fullname]
            return cls._find_spec(fullname, Path(pkg_path))

        # Handle immediate children modules (required for namespaces to work)
        # To avoid problems with case sensitivity in the file system we delegate
        # to the importlib.machinery implementation.
        parent, _, child = fullname.rpartition(".")
        if parent and parent in MAPPING:
            return PathFinder.find_spec(fullname, path=[MAPPING[parent]])

        # Other levels of nesting should be handled automatically by importlib
        # using the parent path.
        return None

    @classmethod
    def _find_spec(cls, fullname: str, candidate_path: Path) -> ModuleSpec | None:
        init = candidate_path / "__init__.py"
        candidates = (candidate_path.with_suffix(x) for x in module_suffixes())
        for candidate in chain([init], candidates):
            if candidate.exists():
                return spec_from_file_location(fullname, candidate)
        return None


class _EditableNamespaceFinder:  # PathEntryFinder
    @classmethod
    def _path_hook(cls, path) -> type[_EditableNamespaceFinder]:
        if path == PATH_PLACEHOLDER:
            return cls
        raise ImportError

    @classmethod
    def _paths(cls, fullname: str) -> list[str]:
        paths = NAMESPACES[fullname]
        if not paths and fullname in MAPPING:
            paths = [MAPPING[fullname]]
        # Always add placeholder, for 2 reasons:
        # 1. __path__ cannot be empty for the spec to be considered namespace.
        # 2. In the case of nested namespaces, we need to force
        #    import machinery to query _EditableNamespaceFinder again.
        return [*paths, PATH_PLACEHOLDER]

    @classmethod
    def find_spec(cls, fullname: str, target=None) -> ModuleSpec | None:  # type: ignore
        if fullname in NAMESPACES:
            spec = ModuleSpec(fullname, None, is_package=True)
            spec.submodule_search_locations = cls._paths(fullname)
            return spec
        return None

    @classmethod
    def find_module(cls, _fullname) -> None:
        return None


def install():
    if not any(finder == _EditableFinder for finder in sys.meta_path):
        sys.meta_path.append(_EditableFinder)

    if not NAMESPACES:
        return

    if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks):
        # PathEntryFinder is needed to create NamespaceSpec without private APIS
        sys.path_hooks.append(_EditableNamespaceFinder._path_hook)
    if PATH_PLACEHOLDER not in sys.path:
        sys.path.append(PATH_PLACEHOLDER)  # Used just to trigger the path hook
c                ó”   • [        [        UR                  5       [        R                  " S5      S95      n[
        R                  XUS9$ )zWCreate a string containing the code for the``MetaPathFinder`` and
``PathEntryFinder``.
r   )r»  ©rs   rÈ   r   )r‚  r×  rf  ÚoperatorÚ
itemgetterÚ_FINDER_TEMPLATEÚformatr  s      r?   r‘  r‘  ‰  s<   € ô ”6˜'Ÿ-™-›/¬x×/BÒ/BÀ1Ó/EÑFÓG€GÜ×"Ñ"¨È*Ð"ÐUÐUrB   c                  ó   • \ rS rSrSrSrg)r²  i“  zCFile system does not seem to support either symlinks or hard links.rC   N)rF   rG   rH   rI   rJ   rM   rC   rB   r?   r²  r²  “  s   † ÜMrB   r²  )r’  r   rE   r�  )r³  r   rE   Úbool)r  úIterable[str]rd   údict[str, str]rY   r   rE   r  )r_   r   rE   úIterator[str])r  r  rd   r  ra   r   rE   r  )re   r   rE   r   )rÚ  r  rE   r  )r  r  rÚ  r  rE   zIterator[tuple[str, list[str]]])rÚ  r  rE   r  )
r‰  r   rÅ  r   r�   r   ró  r   rE   r  )rú  r,   rE   r,   )rs   r   rÈ   r  r   zdict[str, list[str]]rE   r   )crJ   Ú
__future__r   rž  Úloggingr	  rb   rá   r×   Úcollections.abcr   r   r   Ú
contextlibr   Úenumr   Úinspectr	   Ú	itertoolsr
   r   Úpathlibr   Útempfiler   Útypesr   Útypingr   r   r   r   r   rS   r   r   r   r   r   r   r   r3   r   r   Ú	discoveryr   r_   r   Úwarningsr    r!   r#   r¢   r$   r±   r%   r|   r&   rŸ   r'   r£   r(   r®   Útyping_extensionsr)   Ú_vendor.wheel.wheelfiler+   r,   Ú	getLoggerrF   rõ   r/   rq  r9  rO   r  r  rý   r  r0  re  rÿ   r¿  rþ   r€  r�  rØ  r„  rƒ  rÙ  rç  rü   Ú	Installerrˆ   r  r‘  Ú	FileErrorr²  rC   rB   r?   Ú<module>r$     sâ  ðñ
õ #ã 	Û Û Û 	Û Û ß 7Ñ 7Ý Ý Ý ß $Ý Ý 'Ý ß CÕ Cç J× JÝ ß !Ý )Ý ß DÝ %Ý .Ý 1Ý .Ý +Ý CæÝ&å3áˆT˜Ñ!€Ø
×
Ò
˜HÓ
%€ô&$�Dô &$ðR€ðÐ ô^8�Wô ^8ôB	
�xô 
÷ñ ô<K<�
ô K<÷\><ñ ><ôBô*ð(&Øð&Ø*8ð&ØGNð&à	ô&òR'ôô Fð
%Øð
%à"ð
%ð ð
%ð ô	
%ô2ô#ð0 Øð Ø$2ð à$ô ô
ôô,ô(˜*×.Ñ.ô (ð"VÐ ðrVØ
ðVØ)ðVØ7KðVàôVôN˜×(Ñ(õ NrB   