pypi2pkgbuild.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:pypi2pkgbuild 作者: anntzer 项目源码 文件源码
def _get_url_unpacked_path_or_null(url):
    parsed = urllib.parse.urlparse(url)
    if parsed.scheme == "file" and parsed.path.endswith(".whl"):
        return Path("/dev/null")
    try:
        cache_dir, packed_path = _get_url_impl(url)
    except CalledProcessError:
        return Path("/dev/null")
    if packed_path.is_file():  # pip://
        shutil.unpack_archive(str(packed_path), cache_dir.name)
    unpacked_path, = (
        path for path in Path(cache_dir.name).iterdir() if path.is_dir())
    return unpacked_path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号