def GetLinkerLibs(self):
return self.linkerLibs
-def checkextensions(unknown, extra_inis):
+def checkextensions(unknown, extra_inis, prefix):
# Create a table of frozen extensions
defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini")
for mod in unknown:
for ini in extra_inis:
# print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...",
- defn = get_extension_defn( mod, ini )
+ defn = get_extension_defn( mod, ini, prefix )
if defn is not None:
# print "Yay - found it!"
ret.append( defn )
return ret
-def get_extension_defn(moduleName, mapFileName):
+def get_extension_defn(moduleName, mapFileName, prefix):
if win32api is None: return None
+ os.environ['PYTHONPREFIX'] = prefix
dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName)
if dsp=="":
return None
; You must ensure that the environment variable PYTHONEX is set
; to point to the root win32 extensions directory
+; PYTHONPREFIX must point to the Python build root directory
+; (the *parent* of PCbuild); normally the freeze script takes
+; care of this.
+
+
+
+
+
+;--------------------------------------------------------------
+;
+; Standard Python extension modules
+;
+
+; Here are some of the standard Python extensions modules.
+; If you need others, add them here
+
+[_socket]
+dsp=%PYTHONPREFIX%\PCBuild\_socket.dsp
+
+[_sre]
+dsp=%PYTHONPREFIX%\PCBuild\_sre.dsp
+
+[unicodedata]
+dsp=%PYTHONPREFIX%\PCBuild\unicodedata.dsp
+
+[mmap]
+dsp=%PYTHONPREFIX%\PCBuild\mmap.dsp
+
+[winsound]
+dsp=%PYTHONPREFIX%\PCBuild\winsound.dsp
+libs=winmm.lib
+
+[parser]
+dsp=%PYTHONPREFIX%\PCBuild\parser.dsp
+
+[select]
+dsp=%PYTHONPREFIX%\PCBuild\select.dsp
+
+[ucnhash]
+dsp=%PYTHONPREFIX%\PCBuild\ucnhash.dsp
+
+[zlib]
+dsp=%PYTHONPREFIX%\PCBuild\zlib.dsp
+cl=/I %PYTHONPREFIX%\..\zlib113 /D WINDOWS /D _WINDOWS /D ZLIB_DLL /D WIN32
+libs=%PYTHONPREFIX%\..\zlib113dll\static32\zlibstat.lib /nodefaultlib:libc
;--------------------------------------------------------------
;
dsp=%PYTHONEX%\win32\win32evtlog.dsp
cl=/I %PYTHONEX%\win32\src
+[win32process]
+dsp=%PYTHONEX%\win32\win32process.dsp
+cl=/I %PYTHONEX%\win32\src
+
[win32event]
dsp=%PYTHONEX%\win32\win32event.dsp
cl=/I %PYTHONEX%\win32\src
cl=/I %PYTHONEX%\com\win32com\src\include /I %PYTHONEX%\win32\src
libs=uuid.lib
+[win32com.axcontrol.axcontrol]
+dsp=%PYTHONEX%\com\axcontrol.dsp
+cl=/I %PYTHONEX%\win32\src /I %PYTHONEX%\com\win32com\src\include
+
[win32com.axscript.axscript]
dsp=%PYTHONEX%\com\Active Scripting.dsp
cl=/I %PYTHONEX%\win32\src /I %PYTHONEX%\com\win32com\src\include
# default the exclude list for each platform
if win: exclude = exclude + [
- 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2']
+ 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2', 'ce']
# modules that are imported by the Python runtime
implicits = ["site", "exceptions"]
# Get a list of CExtension instances, each describing a module
# (including its source files)
frozen_extensions = checkextensions_win32.checkextensions(
- unknown, extensions)
+ unknown, extensions, prefix)
for mod in frozen_extensions:
unknown.remove(mod.name)
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
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
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)