X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=setup.py;h=54a86d11ba48d387b7e594c811f75a9dd93215fd;hp=57849072eb0c4b836625a2ee90f6f5904e1dfc3e;hb=bf5ff1d116840e1330c80894132919ec515596e4;hpb=781dc628702361a759834ca5fdf117679d33f76a diff --git a/setup.py b/setup.py index 5784907..54a86d1 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,17 @@ import os import shutil import sys -from distutils.core import setup, Command +from distutils.core import setup, Command, Extension + +try: + from Pyrex.Distutils import build_ext +except ImportError: + from distutils.command.build_ext import build_ext + ext_modules = [] +else: + ext_modules = [Extension( + 'bulletml._collision', [os.path.join('bulletml', '_collision.pyx')])] + from distutils.command.clean import clean as distutils_clean from distutils.command.sdist import sdist as distutils_sdist @@ -103,9 +113,9 @@ class test_cmd(Command): raise SystemExit("Test failures are listed above.") if __name__ == "__main__": - setup(cmdclass=dict( - clean=clean, test=test_cmd, coverage=coverage_cmd, sdist=sdist), - name="python-bulletml", version="0.1", + setup(cmdclass=dict(clean=clean, test=test_cmd, coverage=coverage_cmd, + sdist=sdist, build_ext=build_ext), + name="python-bulletml", version="1", url="http://code.google.com/p/python-bulletml/", description="parse and run BulletML scripts", author="Joe Wreschnig", @@ -114,6 +124,7 @@ if __name__ == "__main__": packages=["bulletml"], data_files=glob.glob("examples/*/*.xml") + ["examples/template.xml"], scripts=["bulletml-runner", "bulletml-to-bulletyaml"], + ext_modules=ext_modules, long_description="""\ BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games. (For example Progear, Psyvariar, @@ -124,6 +135,9 @@ renderer-agnostic. In addition to the standard BulletML XML format, this module supports an equivalent YAML format. +Finally, two simple collision routines are provided, bulletml.overlaps +for stationary circles and bulletml.collides for moving circles. + A sample renderer for Pygame is included. More information is available at the BulletML homepage,