-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
60 lines (49 loc) · 1.54 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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,
)