Patch by Toby Dickenson, mentored by Mark Hammond, to support

automatically finding (most of) the standard PYD extensions, and to
remove the hardcoded Python version.
This commit is contained in:
Guido van Rossum 2000-07-13 15:45:17 +00:00
parent 5e70cfe22f
commit f67c2383da
4 changed files with 62 additions and 7 deletions

View file

@ -51,6 +51,7 @@ def makemakefile(outfp, vars, files, target):
sys.stdout = save
def realwork(vars, moddefns, target):
version_suffix = `sys.version_info[0]`+`sys.version_info[1]`
print "# Makefile for Microsoft Visual C++ generated by freeze.py script"
print
print 'target = %s' % target
@ -72,7 +73,7 @@ def realwork(vars, moddefns, target):
print '# The following line assumes you have built Python using the standard instructions'
print '# Otherwise fix the following line to point to the library.'
print 'pythonlib = "$(pythonhome)/pcbuild/python15$(debug_suffix).lib"'
print 'pythonlib = "$(pythonhome)/pcbuild/python%s$(debug_suffix).lib"' % version_suffix
print
# We only ever write one "entry point" symbol - either
@ -87,7 +88,7 @@ def realwork(vars, moddefns, target):
target_ext = ".dll"
print "# As the target uses Python15.dll, we must use this compiler option!"
print "# As the target uses Python%s.dll, we must use this compiler option!" % version_suffix
print "cdl = /MD"
print
print "all: $(target)$(debug_suffix)%s" % (target_ext)