1# 2# This file is part of Gambit 3# Copyright (c) 1994-2016, The Gambit Project (http://www.gambit-project.org) 4# 5# FILE: src/python/setup.py 6# Setuptools configuration file for Gambit Python extension 7# 8# This program is free software; you can redistribute it and/or modify 9# it under the terms of the GNU General Public License as published by 10# the Free Software Foundation; either version 2 of the License, or 11# (at your option) any later version. 12# 13# This program is distributed in the hope that it will be useful, 14# but WITHOUT ANY WARRANTY; without even the implied warranty of 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16# GNU General Public License for more details. 17# 18# You should have received a copy of the GNU General Public License 19# along with this program; if not, write to the Free Software 20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21# 22 23from setuptools import setup 24from distutils.extension import Extension 25from Cython.Distutils import build_ext 26 27# setuptools DWIM monkey-patch madness 28# http:#mail.python.org/pipermail/distutils-sig/2007-September/thread.html#8204 29import sys 30if 'setuptools.extension' in sys.modules: 31 m = sys.modules['setuptools.extension'] 32 m.Extension.__dict__ = m._Extension.__dict__ 33 34import glob 35libgame = Extension("gambit.lib.libgambit", 36 sources=[ "gambit/lib/libgambit.pyx" ] + 37 glob.glob("gambit/lib/*.pxi") + 38 glob.glob("../../library/src/*.cc") + 39 glob.glob("../../library/src/*/*.cc") + 40 glob.glob("../../library/src/*/*.c") + 41 [ "../tools/lp/nfglp.cc", 42 "../tools/lp/efglp.cc", 43 "../tools/logit/path.cc", 44 "../tools/logit/nfglogit.cc", 45 "../tools/logit/efglogit.cc" ], 46 language="c++", 47 include_dirs=[ "../..", "../../library/include", ".." ] ) 48 49setup(name="gambit", 50 version="16.0.1", 51 description="Software tools for game theory", 52 author="Theodore Turocy", 53 author_email="ted.turocy@gmail.com", 54 url="http://www.gambit-project.org", 55 packages=['gambit', 'gambit.games', 'gambit.lib'], 56 ext_modules=[libgame], 57 cmdclass = {'build_ext': build_ext}, 58 entry_points=""" 59 [console_scripts] 60 gambit-shell = gambit.cmdline:gambit_shell 61 """ 62 ) 63