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.
diff --git a/Tools/freeze/winmakemakefile.py b/Tools/freeze/winmakemakefile.py
index 320504b..d668a6e 100644
--- a/Tools/freeze/winmakemakefile.py
+++ b/Tools/freeze/winmakemakefile.py
@@ -51,6 +51,7 @@
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 @@
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 @@
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)