Update of /cvsroot/pywin32/pywin32/Wise
In directory sc8-pr-cvs1:/tmp/cvs-serv31431
Modified Files:
brandPythonwin.py brandWin32.py brandWin32com.py brandall.py
win32all.wse
Log Message:
Force an arg with the Python version to be passed. We don't actually check
the validity, but it ensures it is specified rather than grabbed from
whatever Python is running the script (there is a bug on that)
Also use this to create the compiler variables for WISE, and auto-generate
the installer file.
Index: brandPythonwin.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Wise/brandPythonwin.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** brandPythonwin.py 6 May 2000 12:05:02 -0000 1.2
--- brandPythonwin.py 7 Jul 2003 10:18:41 -0000 1.3
***************
*** 4,8 ****
from brandutils import *
! def doit(buildDesc=None, auto=0, bRebrand = 0, build = None):
path=win32api.GetFullPathName("..\\Pythonwin")
projectName = "$/Python/Pythonwin"
--- 4,8 ----
from brandutils import *
! def doit(pyver=sys.winver, buildDesc=None, auto=0, bRebrand = 0, build = None):
path=win32api.GetFullPathName("..\\Pythonwin")
projectName = "$/Python/Pythonwin"
***************
*** 15,19 ****
import bulkstamp
! major, minor = string.split(sys.winver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
--- 15,19 ----
import bulkstamp
! major, minor = string.split(pyver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
Index: brandWin32.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Wise/brandWin32.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** brandWin32.py 6 May 2000 12:05:02 -0000 1.2
--- brandWin32.py 7 Jul 2003 10:18:41 -0000 1.3
***************
*** 4,8 ****
from brandutils import *
! def doit(buildDesc = None, auto=0, bRebrand = 0, build = None):
path=win32api.GetFullPathName("..\\win32")
projectName = "$/Python/Python Win32 Extensions"
--- 4,8 ----
from brandutils import *
! def doit(pyver=sys.winver,buildDesc = None, auto=0, bRebrand = 0, build = None):
path=win32api.GetFullPathName("..\\win32")
projectName = "$/Python/Python Win32 Extensions"
***************
*** 15,19 ****
import bulkstamp
! major, minor = string.split(sys.winver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
--- 15,19 ----
import bulkstamp
! major, minor = string.split(pyver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
Index: brandWin32com.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Wise/brandWin32com.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** brandWin32com.py 6 May 2000 12:05:02 -0000 1.2
--- brandWin32com.py 7 Jul 2003 10:18:41 -0000 1.3
***************
*** 5,9 ****
! def doit(buildDesc = None, auto=0, bRebrand = 0, build=None):
path=win32api.GetFullPathName("..\\com\\Build")
projectName = "$/Python/Python COM"
--- 5,9 ----
! def doit(pyver=sys.winver, buildDesc = None, auto=0, bRebrand = 0, build=None):
path=win32api.GetFullPathName("..\\com\\Build")
projectName = "$/Python/Python COM"
***************
*** 15,19 ****
import bulkstamp
! major, minor = string.split(sys.winver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
--- 15,19 ----
import bulkstamp
! major, minor = string.split(pyver, ".")
bulkstamp.scan( build, path, "desc.txt", major=major, minor=minor )
subst_dict = {"vss_label" : build }
Index: brandall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Wise/brandall.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** brandall.py 8 Oct 2002 11:43:06 -0000 1.3
--- brandall.py 7 Jul 2003 10:18:41 -0000 1.4
***************
*** 5,9 ****
import getopt
- import sys
sys.path.append(r"..\win32\scripts\VersionStamp")
--- 5,8 ----
***************
*** 16,20 ****
auto=0
bRebrand = 0
! opts, args = getopt.getopt(sys.argv[1:], "ad:r")
for (o,v) in opts:
if o=='-d':
--- 15,19 ----
auto=0
bRebrand = 0
! opts, args = getopt.getopt(sys.argv[1:], "ad:rw:")
for (o,v) in opts:
if o=='-d':
***************
*** 25,38 ****
bRebrand = 1
! if len(args) != 1:
! print "You must enter the build number"
return
if args[0] == "cvs":
- import time
# days since epoch <wink>
build = str(int(time.time() / 3600 / 24))
build_suffix = time.strftime("%Y%m%d", time.gmtime(time.time()))
else:
! build = args[0]
build_suffix = build
# projectName = "$/Python/Wise/win32all"
--- 24,58 ----
bRebrand = 1
! if len(args) != 2:
! print "You must enter the Python version and the build number"
return
+ defines = []
if args[0] == "cvs":
# days since epoch <wink>
+ import time
build = str(int(time.time() / 3600 / 24))
build_suffix = time.strftime("%Y%m%d", time.gmtime(time.time()))
+ defines.append("PY_DEV_BUILD=1")
+ # xxx
else:
! pyver = args[0]
! build = args[1]
! defines.append("PY_DEV_BUILD=0")
! try:
! if len(pyver.split("."))!=2:
! raise ValueError, "Bad python version '%s'" % pyver
! int(build) # check integer
! defines.append("PYVER_DOTTED=" + pyver)
! defines.append("PYVER_NODOT=" + "".join(pyver.split(".")))
! except ValueError, why:
! print why
! return
! if sys.executable.find("_d")<0:
! print "Oops - can't brand myself - spawing debug version."
! base, ext = os.path.splitext(sys.executable)
! exe = base + "_d" + ext
! os.execv(exe, [exe]+sys.argv)
! # Does not return
! assert(False)
build_suffix = build
# projectName = "$/Python/Wise/win32all"
***************
*** 43,53 ****
# return
! if not brandWin32.doit(desc, auto, bRebrand, build):
return
! if not brandWin32com.doit(desc, auto, bRebrand, build):
return
! if not brandPythonwin.doit(desc, auto, bRebrand, build):
return
--- 63,73 ----
# return
! if not brandWin32.doit(pyver, desc, auto, bRebrand, build):
return
! if not brandWin32com.doit(pyver, desc, auto, bRebrand, build):
return
! if not brandPythonwin.doit(pyver, desc, auto, bRebrand, build):
return
***************
*** 56,63 ****
import brandutils
! subst_dict = {"build_no" : build }
brandutils.SubstituteInFile("win32all_ver.wse.in", "win32all_ver.wse", subst_dict)
!
! if __name__=='__main__':
doit()
--- 76,102 ----
import brandutils
! subst_dict = {"build_no" : build,
! "pyver_dotted" : pyver,
! "pyver_nodot" : ''.join(pyver.split('.')),
! }
brandutils.SubstituteInFile("win32all_ver.wse.in", "win32all_ver.wse", subst_dict)
+ # and generate the installation file.
+ if defines:
+ wse_name = "win32all.wse"
+ if not os.path.isfile(wse_name):
+ print "Can not find '%s' - can not generate installation" % wse_name
+ return
+ defines_str = ""
+ for d in defines:
+ defines_str += "/D" + d + " "
+ # find the .exe for .wse files.
+ ignore, exe_name = win32api.FindExecutable(wse_name)
+ cmd = "%s %s /c %s" % (exe_name, defines_str, wse_name)
+ print "About to generate WISE installer."
+ print "Command: %s" % (cmd,)
+ print "Press ENTER to continue"
+ raw_input()
+ os.system(cmd)
! if __name__=='__main__':
doit()
Index: win32all.wse
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Wise/win32all.wse,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** win32all.wse 10 Mar 2003 00:57:53 -0000 1.26
--- win32all.wse 7 Jul 2003 10:18:41 -0000 1.27
***************
*** 9,13 ****
Start Gradient=0 0 255
End Gradient=0 0 0
! Windows Flags=00000100000011010010110100011000
Log Pathname=%MAINDIR%\W32INST.LOG
Message Font=MS Sans Serif
--- 9,13 ----
Start Gradient=0 0 255
End Gradient=0 0 0
! Windows Flags=00000100000010010010110100011000
Log Pathname=%MAINDIR%\W32INST.LOG
Message Font=MS Sans Serif
***************
*** 18,22 ****
Patch Threshold=85
Patch Memory=4000
! EXE Filename=win32all-153.exe
Code Sign Name=Python Win32 combined extensions
Code Sign Info=skippinet.com.au
--- 18,22 ----
Patch Threshold=85
Patch Memory=4000
! EXE Filename=win32all-154.exe
Code Sign Name=Python Win32 combined extensions
Code Sign Info=skippinet.com.au
|