
    ϶vg}
                       U d dl mZ d dlZd dlZd dlZd dlmZmZmZ d dl	m
Z
 erd dlmZ eeej        e         f         Zded<    edeeej        e         f         	          Zd
 ZddZddZej        d             ZdS )    )annotationsN)TYPE_CHECKINGTypeVarUnion)unique_everseen)	TypeAliasr   StrPathStrPathT)boundc                p    t           j                            |           }t          j        |d           dS )z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)r   r   s     M/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/_path.pyensure_directoryr      s0    good##GK$''''''    p1p2returnboolc                B    t          |           t          |          k    S )a  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   filenamestrc                   t           j        dk    rt          j                            |           n| }t          j                            t          j                            t          j                            |                              S )z2Normalize a file/dir name for comparison purposes.cygwin)sysplatformr   r   abspathnormcaserealpathr   )r   files     r   r   r   *   s^     ),(@(@27??8$$$hD7BG,,RW-=-=d-C-CDDEEEr   c              #  h  K   t                      }t          j                            d|          }t          j                            dd          }	 t          j                            t          |                     }t          d||g          }t          j                            |          }|r|t          j        d<   dV  ||u r"t          j                            dd           dS |t          j        d<   dS # ||u r!t          j                            dd           n|t          j        d<   w xY w)a  
    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_pythonpathr7   1   s     * hhGjnn\7;;Ob997!7!788(:;<<:??7++ 	0'/BJ|$g%%JNN<.....'6BJ|$$$ g%%JNN<....'6BJ|$6666s   A2C; ;6D1)r   r	   r   r	   r   r   )r   r	   r   r   )
__future__r   
contextlibr   r    typingr   r   r   more_itertoolsr   typing_extensionsr   r   PathLiker	   __annotations__r
   r   r   r   contextmanagerr7    r   r   <module>rA      s-   " " " " " " "     				 



 0 0 0 0 0 0 0 0 0 0 * * * * * * ,++++++3C 001 1 1 1 17:U3C0@+@%ABBB( ( (( ( ( (&F F F F "7 "7 "7 "7 "7r   