elif opt in ('--libs', '--ldflags'): libs = ['-lpython' + pyver + (sys.pydebug and "_d" or "")] libs += getvar('LIBS').split() libs += getvar('SYSLIBS').split() # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags': if not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) if not getvar('PYTHONFRAMEWORK'): libs.extend(getvar('LINKFORSHARED').split()) print ' '.join(libs)
elif opt == '--extension-suffix': print (sys.pydebug and "_d" or "") + sysconfig.get_config_var('SO')