Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.718 kb
import getopt
import sys
from distutils.sysconfig import *
import os.path
mf = get_makefile_filename ()
d = parse_makefile (mf)
optlist, args = getopt.getopt (sys.argv[1:], "IvlcxF")
for o in optlist:
opt = o[0]
if opt == '-I':
print get_python_inc ()
elif opt == '-v':
print get_python_version ()
elif opt == '-l':
dir,_ = os.path.split (mf)
v = get_python_version ()
libs = d['LIBS']
syslibs = d['SYSLIBS']
print "-L%s -lpython%s %s %s" % (dir, v, libs, syslibs)
elif opt == '-c':
print d['CC']
elif opt == '-x':
print d['CXX']
elif opt == '-F':
print d['LDFLAGS']
Jump to Line
Something went wrong with that request. Please try again.