Here's a sample setup.py from one of my projects. Never tested the windows part:
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup settings for TerraTool Usage (MacOS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ import ez_setup ez_setup.use_setuptools() import os, sys import dabo #, dabo.icons from setuptools import setup # locales: daboDir = os.path.split(dabo.__file__)[0] localeDir = os.path.join(daboDir, 'locale') locales = [ ('lib/python2.5/dabo.locale', ( os.path.join(localeDir, 'dabo.pot'), ) ), ('lib/python2.5/dabo.locale/de/LC_MESSAGES', (os.path.join(localeDir, 'de', 'LC_MESSAGES', 'dabo.mo'),)), ('lib/python2.5/dabo.locale/en/LC_MESSAGES', (os.path.join(localeDir, 'en', 'LC_MESSAGES', 'dabo.mo'),)), ('locale/de/LC_MESSAGES/terratool.mo'), ('locale/en/LC_MESSAGES/terratool.mo'), ] mainscript = 'terratool.py' NAME = 'TerraTool' VERSION = '0.1.0' APP = [mainscript] DATA_FILES = locales APP_OPTIONS = { 'argv_emulation': True, 'includes' : ['wx', 'wx.gizmos', 'wx.lib.calendar', 'dabo', 'Growl'], #, 'wx.lib.masked', 'dabo.icons', 'excludes' : ['kinterbasdb', 'psycopg2', 'MySQLdb', 'numpy'], 'iconfile' : 'appIcon.icns', } # includes must not reside in zipped eggs, i.e. install via "easy_install -Z foo" EXE_OPTIONS = { } plist = dict( CFBundleName = NAME, CFBundleShortVersionString = VERSION, CFBundleGetInfoString = '%s %s' % (NAME, VERSION), CFBundleExecutable = NAME, CFBundleIdentifier = ' net.fiee.terratool', ) 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>TerraTool</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly> """ if sys.platform == 'darwin': APP_OPTIONS['plist'] = plist extra_options = dict( # Cross-platform applications generally expect sys.argv to # be used for opening files. setup_requires=['py2app'], app=APP, options={'py2app': APP_OPTIONS}, ) elif sys.platform == 'win32': """ windows = [ { "script": mainscript, "icon_resources": [(1, "yourapplication.ico")], "other_resources": [(24,1,manifest)] } ], data_files=["yourapplication.ico"] """ extra_options = dict( script = mainscript, setup_requires=['py2exe'], app=APP, ) else: extra_options = dict( # Normally unix-like platforms will use "setup.py install" # and install the main script as such scripts=APP, ) setup( name=NAME, data_files=DATA_FILES, **extra_options ) Greetlings, Hraban _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]