pygame + py2exe = bad exe. why?

Erik Bethke erikbethke at gmail.com
Sun Jan 16 10:55:36 EST 2005


M.E.Farmer wrote:
>
> Erik glad to see you were able to track it down.
> Have you been succesful in making the changes they mentioned?
> M.E.Farmer

Yes below is a simple script that works.  The key was that pygame uses
freesansbold.ttf as the default font and that is not copied over in the
normal py2exe process.  See the end of the setup script.

#!/usr/bin/env python
from distutils.core import setup
import py2exe, pygame
import glob, shutil

setup(windows=["mahjong.py"],
name='GoPets Mahjong',
version='0.3.1',
description='Mahjong for GoPets Users',
author='Erik Bethke',
author_email='erik at gopetslive.com',
url='www.erikbethke.com',
py_modules=['mahjong','background','board','tile','textBox']
)

shutil.copytree('data', 'dist/data')
shutil.copyfile('freesansbold.ttf', 'dist/freesansbold.ttf')




More information about the Python-list mailing list