From 0c3f127c86af818d260966d2292b199757087157 Mon Sep 17 00:00:00 2001 From: Simon Poirier Date: Sat, 11 Jul 2009 21:39:46 +0000 Subject: repackage --- (limited to 'setup.py') diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..6518a61 --- /dev/null +++ b/setup.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +from distutils.core import setup, Command +from os.path import splitext, basename, join as pjoin, walk +import os, sys +import glob + +class TestCommand(Command): + user_options = [('coverage', + None, + 'enable code coverage reporting'), + ('prefix=', + 'p', + 'set sugar installation prefix, for dependency loading'),] + description = 'runs tests from the test directory' + + def initialize_options(self): + self._dir = os.getcwd() + self.coverage = False + self.prefix = None + + def finalize_options(self): + if not self.prefix: + print + sys.exit(1) + + def run(self): + ''' + Finds all the tests modules in tests/, and runs them. + ''' + testfiles = [ ] + for t in glob.glob(pjoin(self._dir, 'tests', '*.py')): + if not t.endswith('__init__.py'): + testfiles.append('.'.join( + ['tests', splitext(basename(t))[0]]) + ) + + tests = TestLoader().loadTestsFromNames(testfiles) + t = TextTestRunner(verbosity = 1) + t.run(tests) + +setup(name='Tutorius', + version='0.0', + description='Interactive tutor and Tutorial creator', + maintainer='Simon Poirier', + maintainer_email='simpoir@gmail.com', + author='Tutorius team', + author_email='sugar-narratives@googlegroups.com', + url='http://tutorius.org', + license='GPLv3', + packages=[ + 'sugar.tutorius', + 'sugar.tutorius.addons', + 'sugar.graphics', + 'sugar.activity', + ], + package_dir={'sugar': 'toolkitfix', + 'sugar.tutorius': 'tutorius', + 'sugar.tutorius.addons': 'addons', + }, + cmdclass = {'test': TestCommand}, + data_files=[('share/icons/sugar/scalable/actions', glob.glob('data/icons/*.svg')),] + ) + +# vim: set et sw=4 sts=4 ts=4: -- cgit v0.9.1