+
    SBi                    F  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R R lt]P.                  R 4       tR# )    )annotationsN)TYPE_CHECKINGTypeVarUnion)unique_everseen)	TypeAliasr   StrPathStrPathT)boundc                t    \         P                  P                  V 4      p\         P                  ! VRR7       R# )z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)r   r   s   & 5/usr/lib/python3.14/site-packages/setuptools/_path.pyensure_directoryr      s"    ggood#GKK$'    c               $    V ^8  d   QhRRRRRR/# )   p1r	   p2returnbool )formats   "r   __annotate__r      s!     ( (' (w (4 (r   c                0    \        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                   V ^8  d   QhRR/# )r   filenamer	   r   )r   s   "r   r   r   *   s     O OG Or   c                n    \         P                  R8X  d    \        P                  P	                  V 4      # T # )z
Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
symlink components. Using
os.path.abspath() works around this limitation. A fix in os.getcwd()
would probably better, in Cygwin even more so, except
that this seems to be by design...
cygwin)sysplatformr   r   abspathr"   s   &r   _cygwin_patchr)   *   s'     ),(@277??8$NhNr   c                    V ^8  d   QhRRRR/# )r   r"   r	   r   strr   )r   s   "r   r   r   5   s     Y Yw Y3 Yr   c           	         \         P                  P                  \         P                  P                  \         P                  P	                  \        V 4      4      4      4      # )z2Normalize a file/dir name for comparison purposes.)r   r   normcaserealpathr   r)   r(   s   &r   r   r   5   s:    77BGG,,RWW-=-=mH>U-VWXXr   c              #  z  "   \        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')

PYTHONPATH N)	objectr   environgetpathsepjoinr   filterpop)pathsnothingorig_pythonpathcurrent_pythonpathprefixto_joinnew_paths   &      r   paths_on_pythonpathr@   :   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__
__future__r   
contextlibr   r%   typingr   r   r   more_itertoolsr   typing_extensionsr   r+   PathLiker	   __annotations__r
   r   r    r)   r   contextmanagerr@   )rA   s   @r   <module>rJ      s    " "  	 
 0 0 *+3C 001 1:U3C0@+@%AB((&OY
 "7 "7r   