
    n&ph                       % S SK J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
  \(       a  S SKJr  \\\R                  \   4   rS\S'   \" S\\\R                  \   4   S	9rS
 rSS jrSS jrSS jr\R,                  S 5       rg)    )annotationsN)TYPE_CHECKINGTypeVarUnion)unique_everseen)	TypeAliasr   StrPathStrPathT)boundc                l    [         R                  R                  U 5      n[         R                  " USS9  g)z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)r   r   s     C/var/www/html/venv/lib/python3.13/site-packages/setuptools/_path.pyensure_directoryr      s"    ggood#GKK$'    c                0    [        U 5      [        U5      :H  $ )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)p1p2s     r   	same_pathr      s      B<8B<''r   c                l    [         R                  S:X  a  [        R                  R	                  U 5      $ U $ )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filenames    r   _cygwin_patchr!   *   s'     ),(@277??8$NhNr   c           	         [         R                  R                  [         R                  R                  [         R                  R	                  [        U 5      5      5      5      $ )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              #  p  #    [        5       n[        R                  R                  SU5      n[        R                  R                  SS5      n [        R                  R                  [        U 5      5      n[        SXC/5      n[        R                  R                  U5      nU(       a  U[        R                  S'   Sv   X!L a!  [        R                  R                  SS5        gU[        R                  S'   g! X!L a!  [        R                  R                  SS5        f U[        R                  S'   f = f7f)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_pythonpathr6   :   s     * hGjjnn\7;Ob97!78;<::??7+'/BJJ|$%JJNN<.'6BJJ|$ %JJNN<.'6BJJ|$s   AD6A2C9  9D69:D33D6)r   r	   r   r	   returnbool)r    r	   )r    r	   r7   str)
__future__r   
contextlibr   r   typingr   r   r   more_itertoolsr   typing_extensionsr   r9   PathLiker	   __annotations__r
   r   r   r!   r   contextmanagerr6    r   r   <module>rC      s    "  	 
 0 0 *+3C 001 1:U3C0@+@%AB((&OY
 "7 "7r   