diff options
-rw-r--r-- | pyserial/README.txt | 11 | ||||
-rw-r--r-- | pyserial/examples/setup_demo.py | 35 |
2 files changed, 46 insertions, 0 deletions
diff --git a/pyserial/README.txt b/pyserial/README.txt index b476eb3..d29bbd6 100644 --- a/pyserial/README.txt +++ b/pyserial/README.txt @@ -209,6 +209,17 @@ Tips & Tricks some platforms. Look at the tools from Roger Binns: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bitpim/comscan/ +- When packagin a project with py2exe, it will likely print a warning about + missing modules 'javax.comm'. This warning is uncritical as the module is + used in the Jython implementation that is not used but packaged. + + It can be avoided with: + setup(... + options = {'py2exe': {'excludes': ['javax.comm']}}) + + See also setup_demo.py in the examples. + + References ---------- - Python: http://www.python.org diff --git a/pyserial/examples/setup_demo.py b/pyserial/examples/setup_demo.py new file mode 100644 index 0000000..854c0b9 --- /dev/null +++ b/pyserial/examples/setup_demo.py @@ -0,0 +1,35 @@ +# This is a setup.py example script for the use with py2exe +from distutils.core import setup +import py2exe +import sys, os + +#this script is only useful for py2exe so just run that distutils command. +#that allows to run it with a simple double click. +sys.argv.append('py2exe') + +#get an icon from somewhere.. the python installation should have one: +icon = os.path.join(os.path.dirname(sys.executable), 'py.ico') + +setup( + options = {'py2exe': { + 'excludes': ['javax.comm'], + 'optimize': 2, + 'dist_dir': 'dist', + } + }, + + name = "wxTerminal", + windows = [ + { + 'script': "wxTerminal.py", + 'icon_resources': [(0x0004, icon)] + }, + ], + zipfile = "stuff.lib", + + description = "Simple serial terminal application", + version = "0.1", + author = "Chris Liechti", + author_email = "cliechti@gmx.net", + url = "http://pyserial.sf.net", +) |