-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsetup.py
57 lines (53 loc) · 2.16 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
from distutils.core import Extension, setup
from distutils.command.install import INSTALL_SCHEMES
from Pyrex.Distutils import build_ext
import os
# http://stackoverflow.com/questions/1612733/including-non-python-files-with-setup-py
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
def find_data_files(srcdir, *wildcard):
file_list = []
if not srcdir.endswith('/'):
srcdir+='/'
for files in os.listdir(srcdir):
if files.endswith(wildcard):
file_list.append(srcdir+files)
return file_list
gfx = find_data_files('data/800x600/gfx/', '.png')
levels = find_data_files('data/800x600/levels/', '.lvl')
music = find_data_files('data/800x600/music/', '.ogg')
snd = find_data_files('data/800x600/snd/', '.wav')
setup( name='MysticMine',
version='1.2.0',
author='koonsolo',
author_email='[email protected]',
description='A one switch game',
url='http://www.koonsolo.com/mysticmine/',
download_url='http://github.com/koonsolo/MysticMine',
license='MIT license',
long_description=open('README.md').read(),
scripts=['MysticMine'],
packages=['monorail','monorail.koon'],
data_files=[('monorail/fonts',['monorail/fonts/freesansbold.ttf']),
('monorail/data',['data/800x600/edmunds.ttf','data/800x600/font_default.fnt',
'data/800x600/font_default.png','data/800x600/resources.cfg',
]
),
('monorail/data/locale/en_US/LC_MESSAGES/',['data/800x600/locale/en_US/LC_MESSAGES/monorail.mo']),
('monorail/data/locale/de_DE/LC_MESSAGES/',['data/800x600/locale/de_DE/LC_MESSAGES/monorail.mo']),
('monorail/data/locale/ru_RU/LC_MESSAGES/',['data/800x600/locale/ru_RU/LC_MESSAGES/monorail.mo']),
('monorail/data/gfx',gfx),
('monorail/data/levels',levels),
('monorail/data/music',music),
('monorail/data/snd',snd),
],
ext_modules=[
Extension("monorail.ai", ["monorail/ai.pyx"])
],
cmdclass={'build_ext': build_ext},
requires=[
"pygame",
"numpy",
"pyrex",
],
)