[Distutils] py2exe makes pygame.sysFont crash
Keith Nemitz
musenik at yahoo.com
Tue Apr 12 18:12:26 CEST 2005
I have a small game that runs fine on Windows XP with
just the interpreter, but after using py2exe to create
an executable, the new exe crashes with this error
message:
------------------------
Pygame Parachute Traceback:
File "pygame\sysfont.pyc", line 253, in SysFont
Fatal Python error: (pygame parachute) Segmentation
Fault
This application has requested the Runtime to
terminate it in an unusual way.
Please contact the application's support team for more
information.
----------------------------------------------
I'm using python 2.3 and pygame 1.6. I assume that I
need to explicitly add a library, but I'm not sure
what or how. I hope someone might be able to assist
me. Here is the py2exe code:
----------------------------------------------
import time
import sys
# ModuleFinder can't handle runtime changes to
__path__, but win32com uses them
try:
import modulefinder
import win32com
for p in win32com.__path__[1:]:
modulefinder.AddPackagePath("win32com", p)
for extra in ["win32com.shell"]: #,"win32com.mapi"
__import__(extra)
m = sys.modules[extra]
for p in m.__path__[1:]:
modulefinder.AddPackagePath(extra, p)
except ImportError:
# no build path setup, no worries.
raise RuntimeError("no can load win32com?")
pass
from distutils.core import setup
import py2exe
setup(
# The first three parameters are not required, if
at least a
# 'version' is given, then a versioninfo resource
is built from
# them and added to the executables.
version = "0.2.01",
description = "py2exe script",
name = "The Witch's Yarn",
# targets to build
console = ["main.py"],
#windows = ["main.py"],
)
More information about the Distutils-SIG
mailing list