X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=setup.py;fp=setup.py;h=f39ff02542efe5d89ebfbb3b2f7eccc7c9a0940e;hb=0b5abec00215c76d64da1dfe86b4e333899ebbaa;hp=ed17c8664a7c7a286e0f713d236170f4c8b8355b;hpb=22bc697b67a38dccf5bd1b74fbfbaa7f66813311;p=naja.git diff --git a/setup.py b/setup.py index ed17c86..f39ff02 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,10 @@ """Setuptools setup.py file for Robolock II.""" from setuptools import setup, find_packages +from setuptools.command.sdist import sdist +from setuptools.command.install import install + +from tools import gen_json try: import py2exe @@ -15,6 +19,19 @@ except ImportError: # This should probably be pulled from constants.py VERSION_STR = "0.1" + +class NajaSdist(sdist): + def run(self): + gen_json.main() + sdist.run(self) + + +class NajaInstall(install): + def run(self): + gen_json.main(update=False) + install.run(self) + + setup( name="robolock-II", version=VERSION_STR, @@ -65,12 +82,21 @@ setup( 'pygame', ], + setup_requires=[ + 'PyYAML', + ], + # Files packages=find_packages(), scripts=[ 'scripts/naja', ], + cmdclass={ + 'sdist': NajaSdist, + 'install': NajaInstall, + }, + # py2exe windows=[{ 'script': 'scripts/naja',