source: setup.py @ 2427:402e3761cd5e

Revision 2427:402e3761cd5e, 3.9 KB checked in by Arc Riley <arcriley@…>, 4 years ago (diff)

Updated copyright for 2014 - Happy New Year!

  • Property exe set to *
Line 
1#!/usr/bin/env python3
2''' PySoy's compile and install script '''
3__credits__ = '''
4    Copyright (C) 2006-2014 Copyleft Games Group
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU Affero General Public License as published
8    by the Free Software Foundation, either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU Affero General Public License for more details.
15
16    You should have received a copy of the GNU Affero General Public License
17    along with this program; if not, see http://www.gnu.org/licenses
18'''
19__author__  = 'Copyleft Games Group'
20__version__ = '1.0_beta3'
21
22import os, sys
23import subprocess
24from distutils.core import setup
25from distutils.cmd import Command
26from distutils.command import build_py
27
28# sphinx setup
29from sphinx.setup_command import BuildDoc
30
31# PySoy only supports Python 3.1+
32# Removing this test will only cause it to fail during build on Python 2.x
33#
34if sys.version_info[0] != 3 or sys.version_info[1] == 0 :
35    raise RuntimeError('Python 3.1+ is required for this package.')
36
37from subprocess import getstatusoutput
38
39class WafClean (Command):
40    description = 'Clean using Waf'
41    user_options = []
42
43    def initialize_options (self) :
44        return
45
46
47    def finalize_options (self) :
48        return
49
50
51    def run (self) :
52        subprocess.call(['./waf', 'clean'])
53
54class WafBuild (Command):
55    description = 'Build using Waf'
56    user_options = []
57
58    def initialize_options (self) :
59        return
60
61
62    def finalize_options (self) :
63        return
64
65
66    def run (self) :
67        subprocess.call(['./waf', 'configure', 'build'])
68
69class WafInstall (Command):
70    description = 'Install using Waf'
71    user_options = []
72
73    def initialize_options (self) :
74        return
75
76
77    def finalize_options (self) :
78        return
79
80
81    def run (self) :
82        subprocess.call(['./waf', 'install'])
83
84
85cmdclass = {'build_docs': BuildDoc, 'build_docs_html': BuildDoc,
86            'clean': WafClean, 'build': WafBuild, 'install': WafInstall}
87name = 'PySoy'
88
89if __name__ == '__main__' : setup(
90  #
91  #############################################################################
92  #
93  # PyPI settings (for pypi.python.org)
94  #
95  name             = name,
96  version          = __version__,
97  description      = 'Cloud 3D Game Engine for Python',
98  long_description = ''' ''',
99  author           = __author__,
100  maintainer       = 'Arc Riley',
101  url              = 'http://www.pysoy.org/',
102  download_url     = 'http://hg.pysoy.org/pysoy',
103  license          = 'GNU Affero General Public License version 3 (AGPLv3)',
104  classifiers      = [
105    'Development Status :: 4 - Beta',
106    'Intended Audience :: Developers',
107    'License :: OSI Approved :: GNU Affero General Public License v3',
108    'Natural Language :: English',
109    'Topic :: Education',
110    'Topic :: Games/Entertainment',
111    'Topic :: Multimedia :: Graphics',
112    'Topic :: System :: Distributed Computing',
113  ],
114  #
115  #############################################################################
116  #
117  # Extension settings
118  #
119  cmdclass=cmdclass,
120  command_options={
121        'build_docs': {
122            'source_dir': ('setup.py', 'docs'),
123            'build_dir': ('setup.py', os.path.join("docs", "build")),
124            'project': ('setup.py', name),
125            'version': ('setup.py', __version__),
126            'builder': ('setup.py', 'xml')
127        },
128        'build_docs_html': {
129            'source_dir': ('setup.py', 'docs'),
130            'build_dir': ('setup.py', os.path.join("docs", "build")),
131            'project': ('setup.py', name),
132            'version': ('setup.py', __version__),
133            'builder': ('setup.py', 'html')
134            },
135        },
136)
Note: See TracBrowser for help on using the repository browser.