a DOg@sddlZddlZddlZddlZddlZddlZddZddZejd ddZ ej ejd d Z e ej ejd d ZdS)NcCs t|jS)z= Return a Traversable object for the given package. )fallback_resources__spec__)packager6/opt/alt/python39/lib64/python3.9/importlib/_common.py from_package srcCsNt|jj}z(|jj}||}t|t|dWSt yHYn0|S)N/) pathlibPathoriginparentloaderarchive relative_tozipfilestr Exception)specZpackage_directoryZ archive_pathZrel_pathrrrrs  rccstj|d\}}zJt||t|t|VWzt|WqtyXYq0n$zt|Wnty|Yn00dS)Nsuffix) tempfileZmkstemposwritecloser r removeFileNotFoundError)readerrfdZraw_pathrrr _tempfiles   rccs:t|j|jd}|VWdn1s,0YdS)zu Given a Traversable object, return that object as a path on the local file system in a context manager. rN)r read_bytesname)pathZlocalrrras_file-sr#ccs |VdS)z7 Degenerate behavior for pathlib.Path objects. Nr)r"rrr_8sr$)r)rr rr functools contextlibrrcontextmanagerrsingledispatchr#registerr r$rrrrs