23 Nov
2011
23 Nov
'11
3:07 p.m.
Oscar Benjamin
Would it be slightly better to test just for the existence of the LIBM configuration variable rather than its value? I don't know of an example, but I guess a system could have libm but use a compiler with a different linker argument format.
e.g. if 'libm' in sysconfig.get_config_vars()
No, the following is from OS X: ,---- | >>> from distutils import sysconfig | >>> sysconfig.get_config_var("LIBM") | '' `----
Is there a more general way to discover if the compiler that is going to be used knows of a library with a specified name? Something like
if get_compiler_type().library_exists(libname)
It's probably possible with some custom distutils command, but it's also not worth it IMHO.