1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/usr/bin/env python import sys import optparse,os parser = optparse.OptionParser() parser.add_option("", "--prefix", dest="prefix",default="/usr/local",help="installation prefix (default: /usr/local)") (o, a) = parser.parse_args() print "Configuring prefix=",o.prefix prefix=o.prefix python='python%s.%s' % sys.version_info[:2] file("Makefile","w").write(file("configure.makefile").read() % (prefix, python)) |