[Python-checkins] CVS: python/dist/src/Tools/freeze checkextensions_win32.py,1.4,1.5 extensions_win32.ini,1.2,1.3 freeze.py,1.35,1.36 winmakemakefile.py,1.10,1.11
Guido van Rossum
python-dev@python.org
Thu, 13 Jul 2000 08:45:21 -0700
Update of /cvsroot/python/python/dist/src/Tools/freeze
In directory slayer.i.sourceforge.net:/tmp/cvs-serv7174
Modified Files:
checkextensions_win32.py extensions_win32.ini freeze.py
winmakemakefile.py
Log Message:
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.
Index: checkextensions_win32.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/freeze/checkextensions_win32.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** checkextensions_win32.py 1999/11/02 15:44:40 1.4
--- checkextensions_win32.py 2000/07/13 15:45:17 1.5
***************
*** 55,59 ****
return self.linkerLibs
! def checkextensions(unknown, extra_inis):
# Create a table of frozen extensions
--- 55,59 ----
return self.linkerLibs
! def checkextensions(unknown, extra_inis, prefix):
# Create a table of frozen extensions
***************
*** 69,73 ****
for ini in extra_inis:
# print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...",
! defn = get_extension_defn( mod, ini )
if defn is not None:
# print "Yay - found it!"
--- 69,73 ----
for ini in extra_inis:
# print "Looking for", mod, "in", win32api.GetFullPathName(ini),"...",
! defn = get_extension_defn( mod, ini, prefix )
if defn is not None:
# print "Yay - found it!"
***************
*** 80,85 ****
return ret
! def get_extension_defn(moduleName, mapFileName):
if win32api is None: return None
dsp = win32api.GetProfileVal(moduleName, "dsp", "", mapFileName)
if dsp=="":
--- 80,86 ----
return ret
! 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=="":
Index: extensions_win32.ini
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/freeze/extensions_win32.ini,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** extensions_win32.ini 1998/08/25 14:06:53 1.2
--- extensions_win32.ini 2000/07/13 15:45:17 1.3
***************
*** 10,16 ****
--- 10,61 ----
; 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
+
+ ;--------------------------------------------------------------
+ ;
; Win32 Projects.
;
***************
*** 40,43 ****
--- 85,92 ----
cl=/I %PYTHONEX%\win32\src
+ [win32process]
+ dsp=%PYTHONEX%\win32\win32process.dsp
+ cl=/I %PYTHONEX%\win32\src
+
[win32event]
dsp=%PYTHONEX%\win32\win32event.dsp
***************
*** 82,85 ****
--- 131,138 ----
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]
Index: freeze.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/freeze/freeze.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** freeze.py 2000/05/06 03:18:08 1.35
--- freeze.py 2000/07/13 15:45:17 1.36
***************
*** 113,117 ****
# default the exclude list for each platform
if win: exclude = exclude + [
! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2']
# modules that are imported by the Python runtime
--- 113,117 ----
# default the exclude list for each platform
if win: exclude = exclude + [
! 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2', 'ce']
# modules that are imported by the Python runtime
***************
*** 377,381 ****
# (including its source files)
frozen_extensions = checkextensions_win32.checkextensions(
! unknown, extensions)
for mod in frozen_extensions:
unknown.remove(mod.name)
--- 377,381 ----
# (including its source files)
frozen_extensions = checkextensions_win32.checkextensions(
! unknown, extensions, prefix)
for mod in frozen_extensions:
unknown.remove(mod.name)
Index: winmakemakefile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/freeze/winmakemakefile.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** winmakemakefile.py 1999/11/02 15:44:40 1.10
--- winmakemakefile.py 2000/07/13 15:45:17 1.11
***************
*** 52,55 ****
--- 52,56 ----
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
***************
*** 73,77 ****
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
--- 74,78 ----
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/python%s$(debug_suffix).lib"' % version_suffix
print
***************
*** 88,92 ****
! print "# As the target uses Python15.dll, we must use this compiler option!"
print "cdl = /MD"
print
--- 89,93 ----
! print "# As the target uses Python%s.dll, we must use this compiler option!" % version_suffix
print "cdl = /MD"
print