1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4# ####################################################################
5#  Copyright (C) 2005-2019 by the FIFE team
6#  http://www.fifengine.net
7#  This file is part of FIFE.
8#
9#  FIFE is free software; you can redistribute it and/or
10#  modify it under the terms of the GNU Lesser General Public
11#  License as published by the Free Software Foundation; either
12#  version 2.1 of the License, or (at your option) any later version.
13#
14#  This library is distributed in the hope that it will be useful,
15#  but WITHOUT ANY WARRANTY; without even the implied warranty of
16#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17#  Lesser General Public License for more details.
18#
19#  You should have received a copy of the GNU Lesser General Public
20#  License along with this library; if not, write to the
21#  Free Software Foundation, Inc.,
22#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23# ####################################################################
24
25
26from distutils.core import setup, Command
27import os, sys
28
29
30class SetMetadataCommand(Command):
31    description = 'set metadata to be used by the following commands'
32    user_options = [
33        ('version=', None, 'set the package version'),
34    ]
35    def initialize_options(self):
36        self.version = None
37    def finalize_options(self):
38        return
39    def run(self):
40        print("setting package version to {}".format(self.version))
41        self.distribution.metadata.version = self.version
42
43
44if sys.platform == 'win32':
45	pkg_data = {'fife': ['*.py','*.pyd','*.dll'] }
46else:
47	pkg_data = {'fife': ['*.so'] }
48
49
50setup(name='libfife',
51      version='0.4.2',
52      description='Flexible Isometric Free Engine',
53      url='www.fifengine.net',
54      packages = ['fife', 'fife.extensions', 'fife.extensions.pychan', 'fife.extensions.librocket', 'fife.extensions.cegui', 'fife.extensions.pychan.widgets', 'fife.extensions.pychan.dialog', 'fife.extensions.pychan.widgets.ext', 'fife.extensions.serializers' ],
55      package_dir = { '': os.path.join('engine','python') },
56      package_data = pkg_data,
57      data_files = [(os.path.join('lib','site-packages', 'fife'),['AUTHORS','CHANGELOG.md', 'LICENSE.md' ,'README.md'])],
58      license = 'GNU Lesser General Public License, version 2.1',
59      cmdclass = { 'set_metadata': SetMetadataCommand }
60      )
61
62