[Spambayes-checkins] spambayes/windows/py2exe setup_all.py,1.2,1.3

Mark Hammond mhammond at users.sourceforge.net
Sun Sep 14 01:23:53 EDT 2003


Update of /cvsroot/spambayes/spambayes/windows/py2exe
In directory sc8-pr-cvs1:/tmp/cvs-serv28887

Modified Files:
	setup_all.py 
Log Message:
New the new py2exe sandbox "targets" feature I ject checked in.  This now
works for everything bar Outlook, and that is *very* close (no dialogs 
yet!)


Index: setup_all.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/setup_all.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** setup_all.py	12 Sep 2003 12:00:02 -0000	1.2
--- setup_all.py	14 Sep 2003 05:23:51 -0000	1.3
***************
*** 17,21 ****
          modulefinder.AddPackagePath("win32com", p)
      # Not sure why this works for "win32com.mapi" for not "win32com.shell"!
!     for extra in ["win32com.shell"]:
          __import__(extra)
          m = sys.modules[extra]
--- 17,21 ----
          modulefinder.AddPackagePath("win32com", p)
      # Not sure why this works for "win32com.mapi" for not "win32com.shell"!
!     for extra in ["win32com.shell","win32com.mapi"]:
          __import__(extra)
          m = sys.modules[extra]
***************
*** 29,40 ****
  import py2exe
  
! class py2exe_options:
!     bitmap_resources = [(1000, os.path.join(sb_top_dir, r"Outlook2000\dialogs\resources\sblogo.bmp"))]
!     icon_resources = [(1000, os.path.join(sb_top_dir, r"windows\resources\sb-started.ico")),
!                       (1010, os.path.join(sb_top_dir, r"windows\resources\sb-stopped.ico")),
!     ]
!     packages = "spambayes.resources"
!     excludes = "win32ui,pywin" # pywin is a package, and still seems to be included.
  
  # Default and only distutils command is "py2exe" - save adding it to the
  # command line every single time.
--- 29,61 ----
  import py2exe
  
! class Options:
!     def __init__(self, **kw):
!         self.__dict__.update(kw)
  
+ # py2exe_options is a global name found by py2exe
+ py2exe_options = Options(
+     packages = "spambayes.resources,encodings",
+     excludes = "win32ui,pywin,pywin.debugger" # pywin is a package, and still seems to be included.
+ )
+ 
+ # These are just objects passed to py2exe
+ com_server = Options(
+     modules = ["addin"],
+     dest_base = "SpamBayes_Outlook_Addin",
+     bitmap_resources = [(1000, os.path.join(sb_top_dir, r"Outlook2000\dialogs\resources\sblogo.bmp"))],
+     create_exe = False,
+ )
+ 
+ service = Options(
+     modules = ["pop3proxy_service"]
+ )
+ sb_server = Options(
+     script = os.path.join(sb_top_dir, "scripts", "sb_server.py")
+ )
+ pop3proxy_tray = Options(
+     script = os.path.join(sb_top_dir, "windows", "pop3proxy_tray.py"),
+     icon_resources = [(1000, os.path.join(sb_top_dir, r"windows\resources\sb-started.ico")),
+                       (1010, os.path.join(sb_top_dir, r"windows\resources\sb-stopped.ico"))],
+ )
  # Default and only distutils command is "py2exe" - save adding it to the
  # command line every single time.
***************
*** 45,54 ****
        packages = ["spambayes.resources"],
        # We implement a COM object.
!       com_server=["addin"],
        # A service
!       service=["pop3proxy_service"],
        # A console exe for debugging
!       console=[os.path.join(sb_top_dir, "scripts", "sb_server.py")],
        # The taskbar
!       windows=[os.path.join(sb_top_dir, "windows", "pop3proxy_tray.py")],
  )
--- 66,75 ----
        packages = ["spambayes.resources"],
        # We implement a COM object.
!       com_server=[com_server],
        # A service
!       service=[service],
        # A console exe for debugging
!       console=[sb_server],
        # The taskbar
!       windows=[pop3proxy_tray],
  )





More information about the Spambayes-checkins mailing list