X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=setup.py;fp=setup.py;h=c3b572677df8ae6d41f0c94857ea2bc7766512da;hp=0000000000000000000000000000000000000000;hb=259cb70b213abdbcc0ae255aaf275e0bfeabbb10;hpb=9b685c2cd942cb5b1b0c0c400d9493419730df46 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..c3b5726 --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python + +import glob +import os +import shutil + +from distutils.core import setup +from distutils.command.clean import clean as distutils_clean + +class clean(distutils_clean): + def run(self): + # In addition to what the normal clean run does, remove pyc + # and pyo and backup files from the source tree. + distutils_clean.run(self) + def should_remove(filename): + if (filename.lower()[-4:] in [".pyc", ".pyo"] or + filename.endswith("~") or + (filename.startswith("#") and filename.endswith("#"))): + return True + else: + return False + for pathname, dirs, files in os.walk(os.path.dirname(__file__)): + for filename in filter(should_remove, files): + try: os.unlink(os.path.join(pathname, filename)) + except EnvironmentError, err: + print str(err) + + try: os.unlink("MANIFEST") + except OSError: pass + + for base in ["coverage", "build", "dist"]: + path = os.path.join(os.path.dirname(__file__), base) + if os.path.isdir(path): + shutil.rmtree(path) + +if __name__ == "__main__": + from bulletml import VERSION_STRING + setup(cmdclass=dict(clean=clean), + name="python-bulletml", version=VERSION_STRING, + url="http://code.google.com/p/python-bulletml/", + description="parse and run BulletML scripts", + author="Joe Wreschnig", + author_email="joe.wreschnig@gmail.com", + license="MIT-style", + packages=["bulletml"], + data_files=glob.glob("examples/*/*.xml") + ["examples/template/xml"], + scripts=["bulletml-parse", "bulletml-runner"], + long_description="""\ +This module parses and runs BulletML scripts. BulletML is a markup +language for describing complex bullet patterns in shooting games. +More information is available at the BulletML homepage, +http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html. + +The module code is renderer-agnostic. A sample renderer for Pygame is +included. +""" + )