Hi,

I wrote a pygtk script that use matplotlib 0.99.1.1, numpy and pylab.

Everything is going fine during the setup.py compiling but nothing is happening when I click on the .exe file. Same thing when I try to launch exe file with the command line...

Above is the setup.py script I've written copied and modified following advice on the website.

I'm running out of ideas for possible solutions... Any help or further advice would be highly appreciated !

Regards,


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

from distutils.core import setup
import py2exe
import shutil
import matplotlib as mpl
import pylab
import numpy

# Remove the build folder, a bit slower but ensures that build contains the latest
shutil.rmtree("build", ignore_errors=True)

# my setup.py is based on one generated with gui2exe, so data_files is done a bit differently
data_files=[('po',
             ['po/fr_FR/LC_MESSAGES/pyduct.mo']),
            ('resource',
             ['resource/pyduct.glade',
            'resource/pyduct_icon.png']),
            ('docs',
             ['docs/pyduct.pdf'])]
includes = 'cairo, pango, pangocairo, atk, gobject, numpy'
excludes = ['_wxagg', '_tkagg', 'bsddb', 'curses', 'pywin.debugger',
            'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
            'Tkconstants', 'Tkinter', 'pydoc', 'doctest', 'test', 'sqlite3']
packages = ['libpyduct','matplotlib','pylab','pytz']
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll',
                'tk84.dll']
icon_resources = [(1, "resource/pyduct_icon.ico")]

# add the mpl mpl-data folder and rc file
data_files += mpl.get_py2exe_datafiles()

setup(
    name = 'pyduct',
    description = 'HVAC ductworks and pipeworks designer',
    version = '0.1.0',
    windows=[{'script': 'pyduct.py',
                'icon_resources': icon_resources}],
                          # compressed and optimize reduce the size
    options = {"py2exe": {"compressed": 2,
                          "optimize": 2,
                          "includes": includes,
                          "excludes": excludes,
                          "packages": packages,
                          "dll_excludes": dll_excludes,
                          # using 2 to reduce number of files in dist folder
                          # using 1 is not recommended as it often does not work
                          "bundle_files": 2,
                          "dist_dir": 'dist',
                          "xref": False,
                          "skip_archive": False,
                          "ascii": False,
                          "custom_boot_script": '',
                         }
              },

    # using zipfile to reduce number of files in dist
    zipfile = r'lib\library.zip',

    data_files=data_files
)

Avec Internet Explorer, surfez en toute discrétion sur internet Cliquez ici !