+
     h}
  c                  s:  a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	 ^ RI
Ht ]'       d   ^ RIHt ]	]]P                  ],          3,          tR]R&   ]! R]	]]P                  ],          3,          R	7      tR
 tR R ltR R lt]P,                  R 4       tR# )i    )annotationsN)TYPE_CHECKINGTypeVarUnion)unique_everseen)	TypeAliasr   StrPathStrPathT)Zboundc                st    \         P                  P                  V 4      p\         P                  ! VRR7       R# )z1Ensure that the parent directory of `path` existsT)Zexist_okN)ospathdirnameZmakedirs)r	   r
      & 5/usr/lib/python3.14/site-packages/setuptools/_path.pyensure_directoryr      s"    ggood#GKK$'    c               s$    V ^8  d   QhRRRRRR/# )   p1r   p2returnZbool Zformat   "r   __annotate__r      s!     ( (' (w (4 (r   c                s0    \        V 4      \        V4      8H  # )aY  Differs from os.path.samefile because it does not require paths to exist.
Purely string based (no comparison between i-nodes).
>>> same_path("a/b", "./a/b")
True
>>> same_path("a/b", "a/./b")
True
>>> same_path("a/b", "././a/b")
True
>>> same_path("a/b", "./a/b/c/..")
True
>>> same_path("a/b", "../a/b/c")
False
>>> same_path("a", "a/b")
False
)normpath)r   r   s   &&r   	same_pathr      s      B<8B<''r   c               s     V ^8  d   QhRRRR/# )r   filenamer   r   strr   r   r   r   r   r   *   s     F Fw F3 Fr   c                s    \         P                  R8X  d    \        P                  P	                  V 4      MT p\        P                  P                  \        P                  P                  \        P                  P                  V4      4      4      # )z2Normalize a file/dir name for comparison purposes.Zcygwin)sysZplatformr   r	   ZabspathZnormcaseZrealpathr   )r   Zfiler   r   r   r   *   sV     ),(@277??8$hD77BGG,,RWW-=-=d-CDEEr   c              #  sz  "   \        4       p\        P                  P                  RV4      p\        P                  P                  RR4      p \        P                  P                  \        V 4      4      p\        RWC.4      p\        P                  P                  V4      pV'       d   V\        P                  R&   Rx  W!J d#   \        P                  P                  RR4       R# V\        P                  R&   R#   Y!J d"   \        P                  P                  RR4       i T\        P                  R&   i ; i5i)at  
Add the indicated paths to the head of the PYTHONPATH environment
variable so that subprocesses will also see the packages at
these paths.

Do this in a context that restores the value on exit.

>>> getfixture('monkeypatch').setenv('PYTHONPATH', 'anything')
>>> with paths_on_pythonpath(['foo', 'bar']):
...     assert 'foo' in os.environ['PYTHONPATH']
...     assert 'anything' in os.environ['PYTHONPATH']
>>> os.environ['PYTHONPATH']
'anything'

>>> getfixture('monkeypatch').delenv('PYTHONPATH')
>>> with paths_on_pythonpath(['foo', 'bar']):
...     assert 'foo' in os.environ['PYTHONPATH']
>>> os.environ.get('PYTHONPATH')
Z
PYTHONPATHZ N)	Zobjectr   ZenvironZgetZpathsepZjoinr   ZfilterZpop)ZpathsZnothingZorig_pythonpathZcurrent_pythonpathZprefixZto_joinZnew_paths   &      r   paths_on_pythonpathr   1   s     * hGjjnn\7;Ob97!78;<::??7+'/BJJ|$%JJNN<.'6BJJ|$ %JJNN<.'6BJJ|$s   AD;A3C= <D;=;D88D;)__conditional_annotations__Z
__future__r    Z
contextlibr   r   Ztypingr   r   r   Zmore_itertoolsr   Ztyping_extensionsr   r   ZPathLiker   Z__annotations__r   r   r   r   Zcontextmanagerr   )r   s   @r   <module>r      s    " "  	 
 0 0 *+3C 001 1:U3C0@+@%AB((&F "7 "7r   