numpy.distutils.ccompiler.simple_version_match#

distutils.ccompiler.simple_version_match(pat='[-.\\d]+', ignore='', start='')[源代码]#

简单的版本号匹配,用于 CCompiler 和 FCompiler.

参数:
patstr, 可选

正则表达式匹配版本号.默认是 r'[-.\d]+'.

ignorestr, 可选

一个匹配要跳过模式的正则表达式.默认是 '',在这种情况下什么都不会跳过.

startstr, 可选

一个匹配版本号查找起始位置的正则表达式.默认是 '',在这种情况下,查找从给 matcher 的版本字符串的开头开始.

返回:
matchercallable

一个适合用作 distutils.ccompiler.CCompiler 类的 .version_match 属性的函数.`matcher` 接受一个参数,一个版本字符串.