annotate setup.py @ 287:67387621c61b

Added requirements.txt and use it from setup.py
author David Fraser <davidf@sjsoft.com>
date Thu, 05 Sep 2013 16:40:04 +0200
parents 2318792b83c6
children e3ec67b04c03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
1 # setup.py
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
2 # -*- coding: utf8 -*-
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
3 # vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
4
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
5 """Setuptools setup.py file for nagslang."""
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
6
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
7 from setuptools import setup, find_packages
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
8
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
9 try:
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
10 import py2exe
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
11 py2exe # To make pyflakes happy.
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
12 except ImportError:
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
13 pass
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
14
287
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
15 try:
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
16 from pip.req import parse_requirements
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
17 import os
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
18 install_reqs = parse_requirements(os.path.join(os.path.dirname(__file__), 'requirements.txt'))
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
19 reqs = [str(ir.req) for ir in install_reqs]
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
20 except ImportError:
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
21 reqs = []
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
22
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
23 # This should probably be pulled from constants.py
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
24 VERSION_STR = "0.1a"
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
25
12
2318792b83c6 Small PEP8 fixes and add author email.
Simon Cross <hodgestar@gmail.com>
parents: 4
diff changeset
26 setup(
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
27 name="nagslang",
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
28 version=VERSION_STR,
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
29 description="naglsang: Game for PyWeek 17",
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
30
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
31 author=(", ".join([
4
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
32 "Simon Cross",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
33 "Oliver Hambsch",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
34 "Anna Malczyk",
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
35 "Neil Muller",
4
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
36 "Adrianna Pinska",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
37 "Stefano Rivera",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
38 "David Sharpe",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
39 "Jeremy Thurgood",
827ee160ff23 Update authors to reflect the current team.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
40 ])),
12
2318792b83c6 Small PEP8 fixes and add author email.
Simon Cross <hodgestar@gmail.com>
parents: 4
diff changeset
41 author_email="ctpug@googlegroups.com",
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
42
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
43 maintainer="Nagslang Team",
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
44 maintainer_email="ctpug@googlegroups.com",
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
45
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
46 url="http://ctpug.org.za/",
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
47 download_url="https://ctpug.org.za/hg/nagslang/",
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
48
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
49 license="MIT",
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
50
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
51 classifiers=[
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
52 'Development Status :: 4 - Beta',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
53 'Environment :: MacOS X',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
54 'Environment :: Win32 (MS Windows)',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
55 'Environment :: X11 Applications',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
56 'Intended Audience :: End Users/Desktop',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
57 'License :: OSI Approved :: MIT License',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
58 'Natural Language :: English',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
59 'Operating System :: Microsoft :: Windows',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
60 'Operating System :: POSIX',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
61 'Operating System :: MacOS :: MacOS X',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
62 'Programming Language :: Python :: 2.5',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
63 'Programming Language :: Python :: 2.6',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
64 'Topic :: Games/Entertainment :: Role-Playing',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
65 'Topic :: Games/Entertainment :: Arcade',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
66 ],
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
67
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
68 platforms=[
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
69 'Linux',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
70 'Mac OS X',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
71 'Windows',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
72 ],
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
73
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
74 # Dependencies
287
67387621c61b Added requirements.txt and use it from setup.py
David Fraser <davidf@sjsoft.com>
parents: 12
diff changeset
75 install_requires=reqs,
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
76
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
77 # Files
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
78 packages=find_packages(),
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
79 scripts=[
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
80 'scripts/nagslang',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
81 ],
0
1ea8fa09b70f Add skellington
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
82
3
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
83 # py2exe
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
84 console=['scripts/testconsole.py'],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
85 windows=[{
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
86 'script': 'scripts/nagslang',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
87 'icon_resources': [(0, "data/icons/program/icon.ico")],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
88 }],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
89 app=['scripts/nagslang'],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
90 options={
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
91 'py2exe': {
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
92 'skip_archive': 1,
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
93 'dist_dir': 'dist/nagslang-%s' % VERSION_STR,
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
94 'packages': [
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
95 'logging', 'encodings', 'nagslang',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
96 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
97 'includes': [
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
98 'pygame',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
99 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
100 'excludes': [
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
101 'numpy',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
102 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
103 'ignores': [
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
104 # all database modules
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
105 'pgdb', 'Sybase', 'adodbapi',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
106 'kinterbasdb', 'psycopg', 'psycopg2', 'pymssql',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
107 'sapdb', 'pysqlite2', 'sqlite', 'sqlite3',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
108 'MySQLdb', 'MySQLdb.connections',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
109 'MySQLdb.constants.CR', 'MySQLdb.constants.ER',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
110 # old datetime equivalents
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
111 'DateTime', 'DateTime.ISO',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
112 'mx', 'mx.DateTime', 'mx.DateTime.ISO',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
113 # email modules
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
114 'email.Generator', 'email.Iterators', 'email.Utils',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
115 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
116 },
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
117 'py2app': {
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
118 'app': ['run_game.py'],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
119 'argv_emulation': True,
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
120 'iconfile': 'data/icons/program/icon.icns',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
121 'packages': [
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
122 'logging', 'encodings', 'pygame', 'nagslang', 'data',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
123 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
124 'excludes': ['numpy'],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
125 }},
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
126 data_files=[
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
127 # 'COPYRIGHT',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
128 'LICENSE.txt',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
129 'README.txt',
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
130 ],
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
131 include_package_data=True,
04f61ecb89a1 Replace setup.py with our own version.
Jeremy Thurgood <firxen@gmail.com>
parents: 0
diff changeset
132 )