numpy.distutils.ccompiler.simple_version_match#

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

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

参数:
patstr, 可选

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

ignorestr, 可选

匹配要跳过的模式的正则表达式。默认为 '',在这种情况下不跳过任何内容。

startstr, 可选

匹配开始查找版本号位置的正则表达式。默认为 '',在这种情况下,从提供给 matcher 的版本字符串的开头开始搜索。

返回:
matcher可调用对象

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