7 from distutils
.core
import setup
8 from distutils
.command
.clean
import clean
as distutils_clean
10 class clean(distutils_clean
):
12 # In addition to what the normal clean run does, remove pyc
13 # and pyo and backup files from the source tree.
14 distutils_clean
.run(self
)
15 def should_remove(filename
):
16 if (filename
.lower()[-4:] in [".pyc", ".pyo"] or
17 filename
.endswith("~") or
18 (filename
.startswith("#") and filename
.endswith("#"))):
22 for pathname
, dirs
, files
in os
.walk(os
.path
.dirname(__file__
)):
23 for filename
in filter(should_remove
, files
):
24 try: os
.unlink(os
.path
.join(pathname
, filename
))
25 except EnvironmentError, err
:
28 try: os
.unlink("MANIFEST")
31 for base
in ["coverage", "build", "dist"]:
32 path
= os
.path
.join(os
.path
.dirname(__file__
), base
)
33 if os
.path
.isdir(path
):
36 if __name__
== "__main__":
37 from bulletml
import VERSION_STRING
38 setup(cmdclass
=dict(clean
=clean
),
39 name
="python-bulletml", version
=VERSION_STRING
,
40 url
="http://code.google.com/p/python-bulletml/",
41 description
="parse and run BulletML scripts",
42 author
="Joe Wreschnig",
43 author_email
="joe.wreschnig@gmail.com",
45 packages
=["bulletml"],
46 data_files
=glob
.glob("examples/*/*.xml") + ["examples/template.xml"],
47 scripts
=["bulletml-runner"],
49 This module parses and runs BulletML scripts. BulletML is a markup
50 language for describing complex bullet patterns in shooting games.
51 More information is available at the BulletML homepage,
52 http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html.
54 The module code is renderer-agnostic. A sample renderer for Pygame is