[python-win32] [Py2exe-users] py2exe and winxptheme
Andrea Gavana
andrea.gavana at gmail.com
Tue Nov 14 16:50:04 CET 2006
Hi Thomas,
>
> Let me try to guess: Do you have an XP-style manifest for the exe?
>
Yes, I have it, embedded in the setup.py script. I have removed it
from the file I sent to the mailing list because I thought it was
redundant, but if you need to see it I can attach it to my e-mail. Is
it a problem if I have a XP-Style manifest file? Sorry to be so
ignorant in py2exe/WinXP things...
I attach the complete setup.py file. Thank you so much.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
-------------- next part --------------
from distutils.core import setup
import py2exe
import glob
import os
import matplotlib
import shutil
manifest = """
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
version="0.64.1.0"
processorArchitecture="x86"
name="Controls"
type="win32"
/>
<description>KPObject</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
"""
shutil.rmtree("build", ignore_errors=True)
mplfiles = glob.glob(os.sep.join([matplotlib.get_data_path(), '*']))
# Need to explicitly remove cocoa_agg nib folder or py2exe complains
mplfiles.remove(os.sep.join([matplotlib.get_data_path(), 'Matplotlib.nib']))
lst = os.listdir(os.getcwd())
incl = []
for files in lst:
if files.endswith(".py") or files.endswith(".PY"):
incl.append(files[:-3])
includes = incl
packages = ['matplotlib.numerix','pytz']
excludes = ["Tkconstants", "Tkinter", "tcl", '_gtkagg', '_tkagg']
excludes.extend(['_gtkagg','_tkagg','Tkconstants','pywin.debugger',
'pywin.debugger.dbgcon','pywin.dialogs', 'bsddb',
'curses','email','distutil','logging','readline',
'setuptools'])
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll',
'tcl84.dll', 'tk84.dll', 'gdiplus.dll']
setup(
version = "0.1",
description = "KPObject",
name = "KPObject",
data_files = [('matplotlibdata', mplfiles)],
options = {"py2exe": {"compressed": 2,
"optimize": 1,
"includes": includes,
"excludes": excludes,
"packages": packages,
"dll_excludes": dll_excludes,
"bundle_files": 1,
}},
zipfile = None,
windows = [{"script": "KPObject.py",
"icon_resources": [(1, "icons/eni.ico")],
"other_resources": [(24,1,manifest)]}]
)
More information about the Python-win32
mailing list