1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/python import distutils.sysconfig import sys pyver = sys.version[:3] modlibs = distutils.sysconfig.get_config_var("MODLIBS") print "-lpython%s -lm -L@PYTHON_LIBDIR@/python%s/config %s" % \ (pyver, pyver, modlibs)