a „oe ã@sXddlZddlZddlmZeeejfZdd„Zeeedœdd„Z eedœd d „Z dS) éN)ÚUnioncCstj |¡}tj|dd�dS)z1Ensure that the parent directory of `path` existsT)Úexist_okN)ÚosÚpathÚdirnameÚmakedirs)rr©rú1C:\Program Files\Certbot\pkgs\setuptools\_path.pyÚensure_directorys r )Úp1Úp2ÚreturncCst|ƒt|ƒkS)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 rrr Ú same_pathsr)Úfilenamer cCs6tjdkrtj |¡n|}tj tj tj |¡¡¡S)z2Normalize a file/dir name for comparison purposes.Úcygwin)ÚsysÚplatformrrÚabspathÚnormcaseÚrealpathr)rÚfilerrr r!sr) rrÚtypingrÚstrÚPathLikeZ_Pathr Úboolrrrrrr Ús