_i l d dl Z d dlZd dlmZ eee j
f Zd ZdededefdZ dedefd Z
y)
N)Unionc p t j j | }t j |d y)z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)r r s /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_path.pyensure_directoryr s" ggood#GKK$' p1p2returnc 0 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 filenamec t j dk( rt j j | n| }t j j t j j
t j j | S )z2Normalize a file/dir name for comparison purposes.cygwin)sysplatformr r abspathnormcaserealpathr )r files r
r r ! sV ),(@277??8$hD
77BGG,,RWW-=-=d-CDEEr )r r typingr strPathLike_Pathr boolr r r r