Mercurial > pyg.exe
changeset 0:1b950b913098
Initial version
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Thu, 30 May 2013 14:45:13 +0200 |
| parents | |
| children | 8cf03f794933 |
| files | pyg.py pygame.ico setup.py |
| diffstat | 3 files changed, 78 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyg.py Thu May 30 14:45:13 2013 +0200 @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +A runner for games written in Python using the PyGame library. + +Usage: %(__file__)s FILE +""" + +import sys +import runpy + +import pygame + + +if __name__ == '__main__': + try: + path = sys.argv[1] + except IndexError: + print __doc__.strip() % {'__file__': sys.argv[0]} + else: + runpy.run_path(path)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.py Thu May 30 14:45:13 2013 +0200 @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup +import os +import py2exe + + +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', + version='1.0', + author='Radomir Dopieralski', + 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, +) +
