love.py 文件源码

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

项目:lover 作者: jerluc 项目源码 文件源码
def get(env, platform=None):
    if not platform:
        platform = env.platform
    # Only try to download/extract if it doesn't already exist
    if not os.path.exists(env.love_binary(platform=platform)):
        # Only try to download if the .zip doesn't already exist
        if not os.path.exists(env.download_file(platform=platform)):
            print('Downloading LOVE (%s; %s)...' %
                    (env.conf.love_version, platform))
            download(env.download_url(platform=platform),
                    env.download_file(platform=platform))
            print('Download complete!')
        print('Extracting LOVE (%s; %s)...' % (env.conf.love_version,
            platform))
        extract(platform, env.download_file(platform=platform))
        st = os.stat(env.love_binary(platform=platform))
        os.chmod(env.love_binary(platform=platform),
                st.st_mode | stat.S_IEXEC)
        print('Extraction complete!')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号