Source

pyg.exe / setup.py

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup
import os
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


setup(
    name='pyg.exe',
    version='1.0',
    author='Radomir Dopieralski',
    description='A binary launcher for PyGame.',
    author_email='pyg@sheep.art.pl',
    url='https://bitbucket.org/thesheep/pyg.exe',
    scripts=['pyg.py'],
    py_modules=['pyg'],
    zip_safe=True,
    install_requires=['distribute', 'pygame'],
    platforms='any',
    options = {
        'py2exe': {
            'bundle_files': 1,
            'compressed': True,
            'excludes': [
                'doctest',
                'pdb',
                'unittest',
                'difflib',
                'inspect',
                'pyreadline',
                'email',
                '_ssl',
            ]
        },
    },
    windows = [
        {
            'script': "pyg.py",
            'icon_resources': [(0, "pygame.ico")],
        }
    ],
    zipfile = None,
)