diff -u dist-mnemosyne-1.0.1.1/setup.py mnemosyne-1.0.1.1/setup.py
--- dist-mnemosyne-1.0.1.1/setup.py	2008-05-20 20:29:41.000000000 +0200
+++ mnemosyne-1.0.1.1/setup.py	2008-05-20 21:00:07.000000000 +0200
@@ -1,6 +1,7 @@
 import os, sys, shutil
 
-from distutils.core import setup, Extension
+from distutils.core import Extension
+from setuptools import setup
 
 if sys.platform == "win32":
     import py2exe
@@ -144,6 +145,9 @@
 if sys.platform == "win32": # For py2exe.
     base_path = ""
     data_files = None
+elif sys.platform == "darwin": # For py2app.
+    base_path = ""
+    data_files = []
 else:
     base_path = os.path.join(sys.exec_prefix, "lib", "python"+sys.version[:3],
                              "site-packages","mnemosyne")
@@ -153,8 +157,33 @@
 pixmap_path = os.path.join(base_path, "pixmaps")
 util_path   = os.path.join(base_path, "util")
 doc_path    = os.path.join(base_path, "docs")
+build_path    = os.path.join(base_path, "build")
+
+setup_requires = []
+
+# py2app (OS X)
+py2app_options = {
+    'argv_emulation': True, 
+    'includes' : 'sip,qt,cPickle,md5,logging,shutil,xml.sax,xml.sax.drivers2.drv_pyexpat',
+    'resources' : 'mnemosyne',
+    'iconfile' : 'pixmaps/mnemosyne.icns'
+}
+py2app_app = ['build/Mnemosyne.py']
+if 'py2app' in sys.argv:
+    setup_requires.append('py2app')
+    # create the application script
+    if not os.path.exists(build_path):
+        os.mkdir(build_path)
+    # create a copy in build/ with name Mnemosyne.py, because py2app
+    #   needs a script that ends in .py
+    appscript = os.path.join(build_path, 'Mnemosyne.py')
+    source = os.path.join(base_path, "mnemosyne", "pyqt_ui", "mnemosyne")
+    if os.path.exists(appscript):
+        os.unlink(appscript)
+    shutil.copyfile(source, appscript)
 
-setup (name = "mnemosyne",
+
+setup (name = "Mnemosyne",
        version = mnemosyne.version.version,
        author = "Peter Bienstman",
        author_email = "Peter.Bienstman@UGent.be",
@@ -166,5 +195,10 @@
                    "icon_resources":[(1,"pixmaps/mnemosyne.ico")]}],
        #console = [{'script':'mnemosyne/pyqt_ui/mnemosyne',
        #            "icon_resources":[(1,"mnemosyne/pixmaps/mnemosyne.ico")]}],
-       cmdclass = {"py2exe": build_installer}
-       )
+       cmdclass = {"py2exe": build_installer},
+       # py2app
+       setup_requires = setup_requires,
+       options = {'py2app' : py2app_options},
+       app = py2app_app
+)
+

