Import PIL plugins explicitly so that py2exe can find them.
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 1 Mar 2005 08:48:55 +0000 (08:48 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 1 Mar 2005 08:48:55 +0000 (08:48 +0000)
Remove GTK demo directory from Windows dist.

build-windows-py2exe-installer.py
packaging/windows/PIL-plugins-dummy.py [new file with mode: 0644]

index ac18d93..4c19cf4 100755 (executable)
@@ -13,13 +13,14 @@ from os.path import join, isdir, basename
 options = {
     "py2exe": {
         "includes": "pango,atk,gobject",
-        "packages": ["encodings", "PIL"],
+        "packages": ["encodings"],
         },
     }
 
 shutil.copy("src/cmdline/kofoto", "kofoto.py")
 shutil.copy("src/gkofoto/start-installed.py", "gkofoto.py")
-console = ["kofoto.py"]
+shutil.copy("packaging/windows/PIL-plugins-dummy.py", "PIL-plugins-dummy.py")
+console = ["kofoto.py", "PIL-plugins-dummy.py"]
 windows = ["gkofoto.py"]
 sys.argv = [sys.argv[0], "py2exe"]
 
@@ -27,6 +28,8 @@ setup.run(options=options, console=console, windows=windows)
 
 os.unlink("kofoto.py")
 os.unlink("gkofoto.py")
+os.unlink("PIL-plugins-dummy.py")
+os.unlink("dist/PIL-plugins-dummy.exe")
 shutil.rmtree(glob.glob("dist/tcl")[0])
 os.remove(glob.glob("dist/tcl*.dll")[0])
 os.remove(glob.glob("dist/tk*.dll")[0])
@@ -41,6 +44,7 @@ for dir in ["bin", "etc", "lib", "share"]:
         for filename in filenames:
             print "copying %s --> %s" % (join(dirpath, filename), destdir)
             shutil.copy(join(dirpath, filename), destdir)
+shutil.rmtree(glob.glob("dist/share/gtk-*/demo")[0])
 
 shutil.copy("COPYING.txt", "dist/license.txt")
 license_file = open("dist/license.txt", "a")
diff --git a/packaging/windows/PIL-plugins-dummy.py b/packaging/windows/PIL-plugins-dummy.py
new file mode 100644 (file)
index 0000000..4117745
--- /dev/null
@@ -0,0 +1,36 @@
+# Import PIL plugins explicitly so that py2exe can find them.
+
+import ArgImagePlugin
+import BmpImagePlugin
+import CurImagePlugin
+import DcxImagePlugin
+import EpsImagePlugin
+import FliImagePlugin
+import FpxImagePlugin
+import GbrImagePlugin
+import GifImagePlugin
+import IcoImagePlugin
+import ImImagePlugin
+import ImtImagePlugin
+import IptcImagePlugin
+import JpegImagePlugin
+import McIdasImagePlugin
+import MicImagePlugin
+import MpegImagePlugin
+import MspImagePlugin
+import PalmImagePlugin
+import PcdImagePlugin
+import PcxImagePlugin
+import PdfImagePlugin
+import PixarImagePlugin
+import PngImagePlugin
+import PpmImagePlugin
+import PsdImagePlugin
+import SgiImagePlugin
+import SunImagePlugin
+import TgaImagePlugin
+import TiffImagePlugin
+import WmfImagePlugin
+import XVThumbImagePlugin
+import XbmImagePlugin
+import XpmImagePlugin