Added a template directory search list (vs. the previous single option)
[pyrisk.git] / setup.py
1 #!/usr/bin/env python
2
3 from distutils.core import setup
4 from os import walk
5 from os.path import join, sep
6
7 from pyrisk import __version__
8
9
10 def recursive_file_list(install_root, source_root):
11     if source_root[-1] != sep:
12         source_root += sep
13     r = []
14     for dirpath,dirnames,filenames in walk(source_root):
15         assert dirpath.startswith(source_root), dirpath
16         install_dirpath = join(install_root, dirpath[len(source_root):])
17         r.append((install_dirpath, [join(dirpath, f) for f in filenames]))
18     return r
19
20 setup(
21     name='PyRisk',
22     version=__version__,
23     description='Python Risk engine with assorted player interfaces.',
24     long_description='\n'.join([
25             'Currently implemented interfaces:',
26             '  * email',
27             ]),
28     download_url='http://www.physics.drexel.edu/code/tar/pyrisk.tgz',
29     author='W. Trevor King',
30     author_email='wking@drexel.edu',
31     package_dir={'pyrisk': 'pyrisk'},
32     data_files=recursive_file_list('share/pyrisk/templates', 'templates'),
33     classifiers = [
34         'Development Status :: 3 - Alpha',
35         #'Environment :: Console',
36         #'Environment :: Console :: Curses',
37         'Intended Audience :: End Users/Desktop',
38         'Intended Audience :: System Administrators',
39         'License :: OSI Approved :: GNU General Public License (GPL)',
40         'Natural Language :: English',
41         'Operating System :: OS Independent',
42         'Programming Language :: Python',
43         'Topic :: Games/Entertainment :: Board Games'
44         ],
45     )