[Python-checkins] python/dist/src/Lib/distutils/command bdist_wininst.py, 1.47, 1.48

theller at users.sourceforge.net theller at users.sourceforge.net
Fri Feb 20 14:38:54 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24147
Modified Files:
	bdist_wininst.py 
Log Message:
Use the right wininstXX.exe, depending on
msvccompiler.get_build_version().
Distributions without a pre-install-script didn't work any longer, we
must at least provide the terminating NUL character.
Index: bdist_wininst.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_wininst.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** bdist_wininst.py	20 Feb 2004 14:43:03 -0000	1.47
--- bdist_wininst.py	20 Feb 2004 19:38:50 -0000	1.48
***************
*** 250,253 ****
--- 250,256 ----
 script_data = open(self.pre_install_script, "r").read()
 cfgdata = cfgdata + script_data + "\n0円"
+ else:
+ # empty pre-install script
+ cfgdata = cfgdata + "0円"
 file.write(cfgdata)
 header = struct.pack("<iii",
***************
*** 262,268 ****
 
 def get_exe_bytes (self):
! # wininst.exe is in the same directory as this file
 directory = os.path.dirname(__file__)
! filename = os.path.join(directory, "wininst.exe")
 return open(filename, "rb").read()
 # class bdist_wininst
--- 265,274 ----
 
 def get_exe_bytes (self):
! from distutils.msvccompiler import get_build_version
! # wininst-x.y.exe is in the same directory as this file
 directory = os.path.dirname(__file__)
! # we must use a wininst-x.y.exe built with the same C compiler
! # used for python. XXX What about mingw, borland, and so on?
! filename = os.path.join(directory, "wininst-%s.exe" % get_build_version())
 return open(filename, "rb").read()
 # class bdist_wininst


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /