setup.py 文件源码

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

项目:WORLD4py 作者: yamachu 项目源码 文件源码
def run(self):
        install.run(self)

        platform = self._get_platform()
        library_full_path = self._get_install_full_path(
            self._get_base_install_path(),
            self._LIBRARY_NAME[platform][1])

        get_latest_request = Request('https://github.com/yamachu/World/releases/latest',
                                     headers={'Accept': 'application/json'})
        get_latest_response = urlopen(get_latest_request)
        response_str = get_latest_response.read().decode('utf-8')
        response_json = json.loads(response_str)
        latest_version = response_json['tag_name']

        urlretrieve("{}/{}/{}".format(
            self._DOWNLOAD_BASE_URL,
            latest_version,
            self._LIBRARY_NAME[platform][0]), library_full_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号