Skip to content
Browse files

Add setup.py

  • Loading branch information...
1 parent da06acb commit df906f0f82e9964b236df94ab8011125a4bdee1f @richo committed Jan 6, 2013
Showing with 60 additions and 0 deletions.
  1. +60 −0 setup.py
View
60 setup.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+#
+
+"""
+Package information for groundstation package.
+"""
+
+import sys
+from setuptools import setup, Command
+
+VERSION = '0.0.0'
+
+requires = [
+ ]
+
+class TestCommand(Command):
+ """Command for running unittests without install."""
+
+ user_options = [("args=", None, '''The command args string passed to
+ unittest framework, such as
+ --args="-v -f"''')]
+
+ def initialize_options(self):
+ self.args = ''
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ import shlex
+ import unittest
+ test_argv0 = [sys.argv[0] + ' test --args=', 'discover', 'test']
+ #For transfering args to unittest, we have to split args
+ #by ourself, so that command like:
+ #python setup.py test --args="-v -f"
+ #can be executed, and the parameter '-v -f' can be
+ #transfering to unittest properly.
+ test_argv = test_argv0 + shlex.split(self.args)
+ unittest.main(module=None, argv=test_argv)
+
+cmdclass = {
+ 'test': TestCommand,
+ }
+
+setup(
+ name='groundstation',
+ description="A decentralised git syncronisation engine",
+ long_description=open('README.md').read(),
+ url="https://github.com/richo/groundstation",
+ version=VERSION,
+ author="Richo Healey",
+ author_email="richo@psych0tik.net",
+ license="MIT",
+ packages=[
+ 'groundstation',
+ ],
+ install_requires=requires,
+ cmdclass=cmdclass,
+ )

0 comments on commit df906f0

Please sign in to comment.
Something went wrong with that request. Please try again.