From: Neil Date: Sun, 11 Sep 2016 12:40:59 +0000 (+0200) Subject: Add py2exe rules to setup.py X-Git-Tag: tabakrolletjie-v1.0.0~6 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=c06ea70e17bd99e03ebe4d6f8a2841c128b004a1;p=tabakrolletjie.git Add py2exe rules to setup.py --- diff --git a/setup.py b/setup.py index 009c344..53756bb 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,12 @@ from setuptools import setup, find_packages +try: + import py2exe + py2exe # To make pyflakes happy. +except ImportError: + pass + + setup( name="tabakrolletjie", version="0.0.1", @@ -25,4 +32,32 @@ setup( 'Programming Language :: Python :: 2.7', 'Topic :: Games/Entertainment', ], + options={ + 'py2exe': { + 'skip_archive': 1, + 'dist_dir': 'dist/tabakrolletjie-1.0.0', + 'packages': [ + 'logging', 'encodings', 'tabakrolletjie', + ], + 'includes': [ + 'pygame', 'pymunk', + ], + 'excludes': [ + 'numpy', + ], + 'ignores': [ + # all database modules + 'pgdb', 'Sybase', 'adodbapi', + 'kinterbasdb', 'psycopg', 'psycopg2', 'pymssql', + 'sapdb', 'pysqlite2', 'sqlite', 'sqlite3', + 'MySQLdb', 'MySQLdb.connections', + 'MySQLdb.constants.CR', 'MySQLdb.constants.ER', + # old datetime equivalents + 'DateTime', 'DateTime.ISO', + 'mx', 'mx.DateTime', 'mx.DateTime.ISO', + # email modules + 'email.Generator', 'email.Iterators', 'email.Utils', + ], + }, + } )