diff setup.py @ 0:57a7e5537dd9 default tip

initial commit
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 22 Apr 2012 14:03:08 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.py	Sun Apr 22 14:03:08 2012 +0200
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from setuptools import setup
+import os
+import glob
+try:
+    import py2exe
+except ImportError:
+    pass
+else:
+    origIsSystemDLL = py2exe.build_exe.isSystemDLL
+    def isSystemDLL(pathname):
+        if os.path.basename(pathname).lower() in (
+                "libfreetype-6.dll", "sdl_ttf.dll", "libogg-0.dll"):
+                return 0
+        return origIsSystemDLL(pathname)
+    py2exe.build_exe.isSystemDLL = isSystemDLL
+
+    orig_byte_compile = py2exe.build_exe.byte_compile
+    def byte_compile(*args, **kwargs):
+        files = orig_byte_compile(*args, **kwargs)
+        files.extend(os.path.abspath(d) for d in glob.glob("tinworld/*.png"))
+        return files
+    py2exe.build_exe.byte_compile = byte_compile
+
+setup(
+    name='tinworld',
+    version='1.0',
+    author='Radomir Dopieralski',
+    packages=['tinworld'],
+    scripts=['__main__.py'],
+    include_package_data=True,
+    zip_safe=True,
+    install_requires=['distribute', 'pygame'],
+    platforms='any',
+    options = {
+        'py2exe': {
+            'bundle_files': 1,
+            'packages': 'tinworld',
+            'compressed': True,
+            'ascii': True,
+            'excludes': [
+                'doctest',
+                'pdb',
+                'unittest',
+                'difflib',
+                'inspect',
+                'locale',
+                'pyreadline',
+                'optparse',
+                'calendar',
+                'pickle',
+                'email',
+                '_ssl',
+            ]
+        },
+    },
+    data_files = [
+        ("tinworld", glob.glob("tinworld/*.png")),
+    ],
+    windows = [
+        {
+            'script': "__main__.py",
+        }
+    ],
+    zipfile = None,
+)