cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 1 | # This is a setup.py example script for the use with py2exe |
Chris Liechti | fbdd8a0 | 2015-08-09 02:37:45 +0200 | [diff] [blame] | 2 | # |
| 3 | # (C) 2001-2015 Chris Liechti <cliechti@gmx.net> |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 7 | from distutils.core import setup |
Chris Liechti | 4caf6a5 | 2015-08-04 01:07:45 +0200 | [diff] [blame] | 8 | import os |
| 9 | import sys |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 10 | |
Chris Liechti | fbdd8a0 | 2015-08-09 02:37:45 +0200 | [diff] [blame] | 11 | # this script is only useful for py2exe so just run that distutils command. |
| 12 | # that allows to run it with a simple double click. |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 13 | sys.argv.append('py2exe') |
| 14 | |
Chris Liechti | fbdd8a0 | 2015-08-09 02:37:45 +0200 | [diff] [blame] | 15 | # get an icon from somewhere.. the python installation should have one: |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 16 | icon = os.path.join(os.path.dirname(sys.executable), 'py.ico') |
| 17 | |
| 18 | setup( |
Chris Liechti | 4383914 | 2016-02-05 21:09:49 +0100 | [diff] [blame] | 19 | options={ |
| 20 | 'py2exe': { |
| 21 | 'excludes': ['javax.comm'], |
| 22 | 'optimize': 2, |
| 23 | 'dist_dir': 'dist', |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 24 | } |
| 25 | }, |
| 26 | |
Chris Liechti | 3d3e71e | 2016-01-24 23:55:05 +0100 | [diff] [blame] | 27 | name="wxTerminal", |
| 28 | windows=[ |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 29 | { |
| 30 | 'script': "wxTerminal.py", |
| 31 | 'icon_resources': [(0x0004, icon)] |
| 32 | }, |
| 33 | ], |
Chris Liechti | 3d3e71e | 2016-01-24 23:55:05 +0100 | [diff] [blame] | 34 | zipfile="stuff.lib", |
cliechti | 3453f12 | 2009-08-10 22:56:34 +0000 | [diff] [blame] | 35 | |
Chris Liechti | 3d3e71e | 2016-01-24 23:55:05 +0100 | [diff] [blame] | 36 | description="Simple serial terminal application", |
| 37 | version="0.1", |
| 38 | author="Chris Liechti", |
| 39 | author_email="cliechti@gmx.net", |
| 40 | url="https://github.com/pyserial/pyserial/", |
cliechti | 290999b | 2004-06-29 22:08:28 +0000 | [diff] [blame] | 41 | ) |