V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
vance123
V2EX  ›  macOS

本地 Homebrew formulae arm64 兼容性查询

  •  
  •   vance123 · 2021-01-01 20:56:37 +08:00 · 936 次点击
    这是一个创建于 1204 天前的主题,其中的信息可能已经有所发展或是发生改变。
    import requests, subprocess
    
    api = 'https://formulae.brew.sh/api/formula.json'
    items = requests.get(api).json()
    remote = {item['name']: item for item in items}
    
    raw_string = subprocess.check_output(['/usr/local/bin/brew', 'list', '--formula'])
    local = [raw.decode() for raw in raw_string.split()]
    
    for f in local:
        if f in remote:
            try:
                if 'arm64_big_sur' not in remote[f]['bottle']['stable']['files']:
                    print("not support:", f)
            except:
                print("unknown    :", f)
        else:          
            print("third party:", f)
    

    使用方法:复制代码, 然后在终端中运行

    python3 <(pbpaste)
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2988 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 08:21 · PVG 16:21 · LAX 01:21 · JFK 04:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.