X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=setup.py;h=49e8fffbda9d9f1acced73b9fd20c32bbf7621c4;hb=03a118a3e62b13b477c1308514235a7533083d2c;hp=ed17c8664a7c7a286e0f713d236170f4c8b8355b;hpb=f653030d9c18ebd226a515d90a5b3f74bbcf2d70;p=naja.git diff --git a/setup.py b/setup.py index ed17c86..49e8fff 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, @@ -23,7 +40,7 @@ setup( author=(", ".join([ "Simon Cross", "Neil Muller", - "Adrianna Pinska", + "Adrianna Pińska", "Stefano Rivera", "David Sharpe", "Jeremy Thurgood", @@ -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',