-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (41 loc) · 1.23 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
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
# import io, codecs, os
class Tox(TestCommand):
"""Runs Tox comands"""
def finalize_options(self):
"""preps test suite"""
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
"""runs test suite"""
import tox
errcode = tox.cmdline(self.test_args)
sys.exit(errcode)
class PyTest(TestCommand):
"""Runs Python test comands with this test_* infront of it."""
def finalize_options(self):
"""preps test suite"""
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
"""runs test suite"""
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='python-app-template',
version='0.0.1',
description='Implementation of a a basic space invader game',
author='Tetrasol',
author_email='[email protected]',
url='https://github.com',
platforms='any',
test_require=['tox'],
cmdclass={'test': Tox},
extras_require={'testing': ['pytest']},
packages=['pyapp']
)