Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cython build system rationalization:

* Rename Cython include files to .pxi
* Automatically pick up all .pxi files in libgambit wrapper.
* Rename libgambit wrapper file to better reflect scope.
* Include __init__.py in gambit.lib as per proper style.
  • Loading branch information...
commit 9802085d1f8712a29dac2d6879589a675533dad6 1 parent 5b5ef12
@skunath skunath authored tturocy committed
View
1  src/python/.gitignore
@@ -0,0 +1 @@
+gambit/lib/libgambit.cpp
View
8 src/python/gambit/__init__.py
@@ -1,5 +1,5 @@
-import lib.game
+import lib.libgambit
-new_tree = lib.game.new_tree
-new_table = lib.game.new_table
-read_game = lib.game.read_game
+new_tree = lib.libgambit.new_tree
+new_table = lib.libgambit.new_table
+read_game = lib.libgambit.read_game
View
0  src/python/gambit/lib/__init__.py
No changes.
View
0  src/python/gambit/lib/game.pyx → src/python/gambit/lib/game.pxi
File renamed without changes
View
21 src/python/gambit/lib/game.wrap.pyx → src/python/gambit/lib/libgambit.pyx
@@ -117,7 +117,7 @@ cdef extern from "libgambit/mixed.h":
c_MixedStrategyProfileDouble *new_MixedStrategyProfileDouble "new MixedStrategyProfile<double>"(c_Game)
void del_MixedStrategyProfileDouble "delete"(c_MixedStrategyProfileDouble *)
-cdef extern from "game.wrap.h":
+cdef extern from "util.h":
c_Game ReadGame(char *) except +IOError
cxx_string WriteGame(c_Game, int) except +IOError
@@ -135,20 +135,21 @@ import gambit.gameiter
# Includes
######################
-include "strategy.pyx"
-include "strategies.pyx"
+include "strategy.pxi"
+include "strategies.pxi"
-include "player.pyx"
-include "players.pyx"
+
+include "player.pxi"
+include "players.pxi"
-include "outcome.pyx"
-include "outcomes.pyx"
+include "outcome.pxi"
+include "outcomes.pxi"
-include "node.pyx"
+include "node.pxi"
-include "mixed.pyx"
+include "mixed.pxi"
-include "game.pyx"
+include "game.pxi"
def new_tree():
View
0  src/python/gambit/lib/mixed.pyx → src/python/gambit/lib/mixed.pxi
File renamed without changes
View
0  src/python/gambit/lib/node.pyx → src/python/gambit/lib/node.pxi
File renamed without changes
View
0  src/python/gambit/lib/outcome.pyx → src/python/gambit/lib/outcome.pxi
File renamed without changes
View
0  src/python/gambit/lib/outcomes.pyx → src/python/gambit/lib/outcomes.pxi
File renamed without changes
View
0  src/python/gambit/lib/player.pyx → src/python/gambit/lib/player.pxi
File renamed without changes
View
0  src/python/gambit/lib/players.pyx → src/python/gambit/lib/players.pxi
File renamed without changes
View
0  src/python/gambit/lib/strategies.pyx → src/python/gambit/lib/strategies.pxi
File renamed without changes
View
0  src/python/gambit/lib/strategy.pyx → src/python/gambit/lib/strategy.pxi
File renamed without changes
View
0  src/python/gambit/lib/game.wrap.h → src/python/gambit/lib/util.h
File renamed without changes
View
7 src/python/setup.py
@@ -10,8 +10,9 @@
m.Extension.__dict__ = m._Extension.__dict__
import glob
-libgame = Extension("gambit.lib.game",
- sources=[ "gambit/lib/game.wrap.pyx" ] +
+libgame = Extension("gambit.lib.libgambit",
+ sources=[ "gambit/lib/libgambit.pyx" ] +
+ glob.glob("gambit/lib/*.pxi") +
glob.glob("../libgambit/*.cc"),
language="c++",
include_dirs=[ ".." ] )
@@ -21,7 +22,7 @@
author="Theodore Turocy",
author_email="ted.turocy@gmail.com",
url="http://www.gambit-project.org",
- packages=['gambit', 'gambit.games'],
+ packages=['gambit', 'gambit.games', 'gambit.lib'],
ext_modules=[libgame],
cmdclass = {'build_ext': build_ext},
entry_points="""
Please sign in to comment.
Something went wrong with that request. Please try again.