Adrianna: We *can* spell your name correctly
[naja.git] / setup.py
1 # setup.py
2 # -*- coding: utf8 -*-
3 # vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4
4
5 """Setuptools setup.py file for Robolock II."""
6
7 from setuptools import setup, find_packages
8 from setuptools.command.sdist import sdist
9 from setuptools.command.install import install
10
11 from tools import gen_json
12
13 try:
14     import py2exe
15     py2exe  # To make pyflakes happy.
16 except ImportError:
17     pass
18
19 # This should probably be pulled from constants.py
20 VERSION_STR = "0.1"
21
22
23 class NajaSdist(sdist):
24     def run(self):
25         gen_json.main()
26         sdist.run(self)
27
28
29 class NajaInstall(install):
30     def run(self):
31         gen_json.main(update=False)
32         install.run(self)
33
34
35 setup(
36     name="robolock-II",
37     version=VERSION_STR,
38     description="Robolock II - a puzzle game",
39
40     author=(", ".join([
41         "Simon Cross",
42         "Neil Muller",
43         "Adrianna PiƄska",
44         "Stefano Rivera",
45         "David Sharpe",
46         "Jeremy Thurgood",
47     ])),
48     author_email="ctpug@googlegroups.com",
49
50     maintainer="Team Naja (CTPUG)",
51     maintainer_email="ctpug@googlegroups.com",
52
53     url="http://robolock.org/",
54     download_url="http://ctpug.org.za/git/naja",
55
56     license="MIT",
57
58     classifiers=[
59         'Development Status :: 4 - Beta',
60         'Environment :: MacOS X',
61         'Environment :: Win32 (MS Windows)',
62         'Environment :: X11 Applications',
63         'Intended Audience :: End Users/Desktop',
64         'License :: OSI Approved :: MIT License',
65         'Natural Language :: English',
66         'Operating System :: Microsoft :: Windows',
67         'Operating System :: POSIX',
68         'Operating System :: MacOS :: MacOS X',
69         'Programming Language :: Python :: 2.6',
70         'Programming Language :: Python :: 2.7',
71         'Topic :: Games/Entertainment',
72     ],
73
74     platforms=[
75         'Linux',
76         'Mac OS X',
77         'Windows',
78     ],
79
80     # Dependencies
81     install_requires=[
82         'pygame',
83     ],
84
85     setup_requires=[
86         'PyYAML',
87     ],
88
89     # Files
90     packages=find_packages(),
91     scripts=[
92         'scripts/naja',
93     ],
94
95     cmdclass={
96         'sdist': NajaSdist,
97         'install': NajaInstall,
98     },
99
100     # py2exe
101     windows=[{
102         'script': 'scripts/naja',
103         'icon_resources': [(0, "data/icons/robolock.ico")],
104     }],
105     app=['scripts/naja'],
106     options={
107         'py2exe': {
108             'skip_archive': 1,
109             'dist_dir': 'dist/naja-%s' % VERSION_STR,
110             'packages': [
111                 'logging', 'encodings', 'naja',
112             ],
113             'includes': [
114                 'pygame',
115             ],
116             'excludes': [
117                 'numpy', 'pygame.sdlmain_osx', 'winreg', 'AppKit', 'Foundation',
118                 'Numeric', 'OpenGL.GL', '_scproxy', '_sysconfigdata',
119                 'copyreg', 'dummy.Process', 'pkg_resources', 'queue',
120                 'win32evtlog', 'win32evtlogutil',
121             ],
122             'ignores': [
123                 # all database modules
124                 'pgdb', 'Sybase', 'adodbapi',
125                 'kinterbasdb', 'psycopg', 'psycopg2', 'pymssql',
126                 'sapdb', 'pysqlite2', 'sqlite', 'sqlite3',
127                 'MySQLdb', 'MySQLdb.connections',
128                 'MySQLdb.constants.CR', 'MySQLdb.constants.ER',
129                 # old datetime equivalents
130                 'DateTime', 'DateTime.ISO',
131                 'mx', 'mx.DateTime', 'mx.DateTime.ISO',
132                 # email modules
133                 'email.Generator', 'email.Iterators', 'email.Utils',
134             ],
135         },
136         'py2app': {
137             'app': ['run_game.py'],
138             'argv_emulation': True,
139             'iconfile': 'data/icons/program/icon.icns',
140             'packages': [
141                 'logging', 'encodings', 'pygame', 'naja', 'data',
142             ],
143             'excludes': ['numpy'],
144         }},
145     data_files=[
146         # 'COPYRIGHT',
147         'LICENSE.txt',
148         'README.txt',
149     ],
150     include_package_data=True,
151 )