python wheel使用_Python wheel.Wheel方法代碼示例
# 需要導入模塊: from pip import wheel [as 別名]
# 或者: from pip.wheel import Wheel [as 別名]
def from_line(cls, name, comes_from=None, prereleases=None):
"""Creates an InstallRequirement from a name, which might be a
requirement, directory containing 'setup.py', filename, or URL.
"""
url = None
name = name.strip()
req = None
path = os.path.normpath(os.path.abspath(name))
link = None
if is_url(name):
link = Link(name)
elif os.path.isdir(path) and (os.path.sep in name or name.startswith('.')):
if not is_installable_dir(path):
raise InstallationError("Directory %r is not installable. File 'setup.py' not found." % name)
link = Link(path_to_url(name))
elif is_archive_file(path):
if not os.path.isfile(path):
logger.warn('Requirement %r looks like a filename, but the file does not exist', name)
link = Link(path_to_url(name))
# If the line has an egg= definition, but isn't editable, pull the requirement out.
# Otherwise, assume the name is the req for the non URL/path/archive case.
if link and req is None:
url = link.url_without_fragment
req = link.egg_fragment #when fragment is None, this will become an 'unnamed' requirement
# Handle relative file URLs
if link.scheme == 'file' and re.search(r'\.\./', url):
url = path_to_url(os.path.normpath(os.path.abspath(link.path)))
# fail early for invalid or unsupported wheels
if link.ext == wheel_ext:
wheel = Wheel(link.filename) # can raise InvalidWheelFilename
if not wheel.supported():
raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
else:
req = name
return cls(req, comes_from, url=url, prereleases=prereleases)
python wheel使用_Python wheel.Wheel方法代碼示例相关推荐
- python markdown2 样式_Python markdown2.markdown方法代碼示例
本文整理匯總了Python中markdown2.markdown方法的典型用法代碼示例.如果您正苦於以下問題:Python markdown2.markdown方法的具體用法?Python markd ...
- python socketio例子_Python socket.SocketIO方法代碼示例
本文整理匯總了Python中socket.SocketIO方法的典型用法代碼示例.如果您正苦於以下問題:Python socket.SocketIO方法的具體用法?Python socket.Sock ...
- python unescape函数_Python escape.url_unescape方法代碼示例
本文整理匯總了Python中tornado.escape.url_unescape方法的典型用法代碼示例.如果您正苦於以下問題:Python escape.url_unescape方法的具體用法?Py ...
- python linspace函数_Python torch.linspace方法代碼示例
本文整理匯總了Python中torch.linspace方法的典型用法代碼示例.如果您正苦於以下問題:Python torch.linspace方法的具體用法?Python torch.linspac ...
- python里turtle.circle什么意思_Python turtle.circle方法代碼示例
本文整理匯總了Python中turtle.circle方法的典型用法代碼示例.如果您正苦於以下問題:Python turtle.circle方法的具體用法?Python turtle.circle怎麽 ...
- python的from_bytes属性_Python parse.quote_from_bytes方法代碼示例
本文整理匯總了Python中urllib.parse.quote_from_bytes方法的典型用法代碼示例.如果您正苦於以下問題:Python parse.quote_from_bytes方法的具體 ...
- python中startout是什么意思_Python socket.timeout方法代碼示例
本文整理匯總了Python中gevent.socket.timeout方法的典型用法代碼示例.如果您正苦於以下問題:Python socket.timeout方法的具體用法?Python socket ...
- python dict get default_Python locale.getdefaultlocale方法代碼示例
本文整理匯總了Python中locale.getdefaultlocale方法的典型用法代碼示例.如果您正苦於以下問題:Python locale.getdefaultlocale方法的具體用法?Py ...
- pythonitems方法_Python environ.items方法代碼示例
本文整理匯總了Python中os.environ.items方法的典型用法代碼示例.如果您正苦於以下問題:Python environ.items方法的具體用法?Python environ.item ...
- python helper方法_Python io_utils.ImportHelper方法代碼示例
# 需要導入模塊: from bpy_extras import io_utils [as 別名] # 或者: from bpy_extras.io_utils import ImportHelper ...
最新文章
- dae模型如何合并_FBX、DAE模型的格式、导入与骨骼动画
- python怎么导入时间-Python,模块导入方式和time模块的使用
- 支持向量机SVM原理
- 干就行了!!!写程序就像珊瑚,分支太多,哪有那么多复用!
- getter/setter_Getters / Setters。 邪恶。 期。
- 天才基本法_《天才基本法》强推!年度神仙小说,看完这本书我竟然爱上了数学...
- CSS:盒子模型和清除float浮动的三种常用方法
- Web前端笔记-移动端触屏移动视角(two.js)
- android 视网膜黄斑检查 amsler,自测黄斑病变 | 一张图搞定
- 深入解析Mysql 主从同步延迟原理及解决方案
- 关于“客户感知价值提升”的思考(三)---电商渠道客户感知管理方法探讨
- Objective-C Runtime 运行时之一:类与对象
- 答题小程序学习,题库答题类小程序,云开发+cms做后台,有错题集,积分排名,做题进度
- Word删除表格后空白页的方法
- 统计学怎么求加权指数_统计学课程作业(统计指数)
- CocosCreator如何制作微信小游戏
- ubuntu 开机进不去桌面问题
- 4年老用户!从R9s Plus换到Find X3,这些体验太上头
- 一个纸杯子的测试用例
- 电商后台:商品管理系统