masklinn í dag viðrar vel til loftárása | tag includes?
Code :
- import sys
- assert sys.version >= '2', "Install Python 2.0 or greater"
- from distutils.core import setup
- import py2exe
- import os
- 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.0.5",
- description = "File Browser",
- name = "Browser",
- # targets to build
- windows = [ {'script': "Browser.py",
- 'icon_resources': [ (1, 'Icon.ico')],
- 'excludes': ["pywin", "pywin.debugger", "pywin.debugger.dbgcon", "pywin.dialogs", "pywin.dialogs.list","Tkconstants","Tkinter","tcl"] ,}],
- options = {"py2exe": {"compressed": 1,"optimize": 2}},
-
- data_files = [('.',['Browser.nsi','Browser_silent.nsi']),('Resources',['Resources\\'+f for f in os.listdir(os.path.join(os.path.split(sys.argv[0])[0],'Resources'))])]
- )
|
La j'ai un paramètre 'excludes' (qui sert à ne pas inclure les modules dont on a pas besoin), ben il existe un paramètre 'includes' pour forcer l'ajout de modules.
Va voir sur le site officiel & le wiki de py2exe, il doit y avoir des exemples sur include Message édité par masklinn le 01-10-2004 à 14:21:16 ---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
|