_d lddlZddlZddlmZeeej fZdZdededefdZ dedefd Z y) N)Unioncptjj|}tj|dy)z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)rrs 2/usr/lib/python3/dist-packages/setuptools/_path.pyensure_directoryr s"ggood#GKK$'p1p2returnc0t|t|k(S)aDiffers 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 rs r same_pathrs B<8B< ''r filenamectjdk(rtjj |n|}tjj tjj tjj|S)z2Normalize a file/dir name for comparison purposes.cygwin)sysplatformrrabspathnormcaserealpathr)rfiles r rr!sV), (@277??8 $hD 77  BGG,,RWW-=-=d-CD EEr ) rrtypingrstrPathLike_Pathr boolrrr r r"sV  c2;;( (%(U(t(&FuFFr