forked from ziz/curveship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
107 lines (100 loc) · 3.56 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
HAS_SETUPTOOLS = False
extra_args = {'scripts': ['scripts/narrate.py']}
else:
HAS_SETUPTOOLS = True
extra_args = {'entry_points':
{'console_scripts':
['narrate = curveship.runner:main'],
},
}
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
#------------------------------------------------------------------------------
# Build distributions for the core Curveship library.
#------------------------------------------------------------------------------
shared_metadata = {
'version': '0.1',
'classifiers': [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"License :: OSI Approved :: ISC License (ISCL)",
"Programming Language :: Python",
"Topic :: Games/Entertainment",
],
'keywords': "interactive fiction",
'author': "Nick Montfort",
'author_email': "[email protected]",
'url': "http://www.curveship.com",
'license': "ISCL",
}
main_extras = {}
main_extras.update(shared_metadata)
main_extras.update(extra_args)
# Allow for separate sdists from the same checkout
if os.path.isdir('curveship'):
setup(name='curveship',
description='Interactive Narrating for Interactive Fiction',
long_description=README + "\n\n" + CHANGES,
packages=['curveship'],
**main_extras
)
#------------------------------------------------------------------------------
# Build distributions for add-ons.
#------------------------------------------------------------------------------
ADD_ONS = [
('spins', 'Example spins, potentially useful for any fiction', {}),
('adventure', 'Classic Adventure retold under Curveship',
{'entry_points': {
'console_scripts':
['adventure = curveship_adventure.runner:main'],
},
}),
('artmaking', 'Simple example fiction with victory condition',
{'entry_points': {
'console_scripts':
['artmaking = curveship_artmaking.runner:main'],
},
}),
('cloak', 'Variations on classic Cloak of Darkness fiction',
{'entry_points': {
'console_scripts':
['cloak = curveship_cloak.runner:main',
'cplus = curveship_cloak.runner:cplus_main',
],
},
}),
('lost_one', 'Example of discourse-modifying fiction',
{'entry_points': {
'console_scripts':
['lost_one = curveship_lost_one.runner:main'],
},
}),
('robbery', 'The Simulated Bank Robbery, a story (not an IF) '
'for telling via Curveship.',
{'entry_points': {
'console_scripts':
['robbery = curveship_robbery.runner:main'],
},
}),
]
for name, description, extras in ADD_ONS:
# Allow for separate sdists from the same checkout
add_on = 'curveship_%s' % name
if os.path.isdir(add_on):
add_on_extras = {}
add_on_extras.update(shared_metadata)
add_on_extras.update(extras)
if not HAS_SETUPTOOLS:
if 'entry_points' in add_on_extras:
del add_on_extras['entry_points']
setup(name=add_on,
description=description,
packages=[add_on],
**add_on_extras
)