see the example below.
also you need to adapt your Panda3D 1.3.0 installation slightly. see discourse.panda3d.org/viewtopic.php?t=2091 for more information regarding the suggested small change.
import os
import glob
from distutils.core import setup
import py2exe
PANDA_DIR = 'C:\\Panda3D-1.3.0'
setup(
console=['yourMainScript.py'],
#or make sure you don't open a console window
#windows=['yourMainScript.py'],
options = {
'py2exe' : {
'unbuffered' : True,
'optimize' : 2,
'includes' : [
# include a list of modules that are not found
# by py2exe here
'mymodule.mysubmodule',
],
'ignores' : [
# include a list of modules to ignore
'mydebugmodule.mydebugsubmodule',
],
'dist_dir' : 'dist',
},
},
packages = [
'direct',
'direct.directbase',
'direct.showbase',
'direct.interval',
'direct.actor',
'direct.gui',
'direct.task',
'direct.controls',
'direct.directnotify',
'direct.directtools',
'direct.directutil',
'direct.fsm',
'direct.cluster',
'direct.particles',
'direct.tkpanels',
'direct.tkwidgets',
'direct.directdevices',
'direct.distributed',
'pandac',
],
package_dir = {
'direct' : os.path.join(PANDA_DIR, 'direct'),
'direct.directbase' : os.path.join(PANDA_DIR, 'direct/directbase'),
'direct.showbase' : os.path.join(PANDA_DIR, 'direct/showbase'),
'direct.interval' : os.path.join(PANDA_DIR, 'direct/interval'),
'direct.actor' : os.path.join(PANDA_DIR, 'direct/actor'),
'direct.gui' : os.path.join(PANDA_DIR, 'direct/gui'),
'direct.task' : os.path.join(PANDA_DIR, 'direct/task'),
'direct.control' : os.path.join(PANDA_DIR, 'direct/control'),
'direct.directnotify' : os.path.join(PANDA_DIR, 'direct/directnotify'),
'direct.directtools' : os.path.join(PANDA_DIR, 'direct/directtools'),
'direct.directutil' : os.path.join(PANDA_DIR, 'direct/directutil'),
'direct.fsm' : os.path.join(PANDA_DIR, 'direct/fsm'),
'direct.cluster' : os.path.join(PANDA_DIR, 'direct/cluster'),
'direct.particles' : os.path.join(PANDA_DIR, 'direct/particles'),
'direct.tkpanels' : os.path.join(PANDA_DIR, 'direct/tkpanels'),
'direct.tkwidgets' : os.path.join(PANDA_DIR, 'direct/tkwidgets'),
'direct.directdevices' : os.path.join(PANDA_DIR, 'direct/directdevices'),
'direct.distributed' : os.path.join(PANDA_DIR, 'direct/distributed'),
'pandac' : os.path.join(PANDA_DIR, 'pandac'),
},
data_files = [
# a list of data files
('etc', [os.path.join(PANDA_DIR, 'etc/Config.prc')]),
('avatars', glob.glob('avatars/*.ini') + glob.glob('avatars/*.egg')),
('cameras', ['cameras/*.ini']),
('config', ['config/init.ini', 'config/mapping.ini', 'config/online.ini', 'config/scene.ini'] + glob.glob('config/*.ini')),
# make sure all dlls are copied from Panda3D
('.', glob.glob(os.path.join(PANDA_DIR, 'bin/*.dll'))),
],
)