-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
92 lines (66 loc) · 1.93 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env python
import os
from distutils.core import setup, Command
from distutils.command.install import install
class RunTests(Command):
"""Run the test suite."""
description = 'run all tests'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
subprocess.call(['python', '-m', 'unittest', 'discover', '-v'])
class CoverageRun(Command):
"""Run coverage analysis."""
description = 'run test coverage analysis'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
subprocess.call([
'python-coverage',
'run',
'-m',
'unittest',
'discover',
'-v'
])
class CoverageReport(Command):
"""Report results of coverage analysis."""
description = 'report results of coverage analysis'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
subprocess.call(['python-coverage', 'report', '-m'])
class GHDInstall(install):
user_options = install.user_options
def initialize_options(self):
install.initialize_options(self)
def run(self):
install.run(self)
install.copy_tree(self, './man', os.path.join(self.prefix, 'man'))
setup(name='ghdecoy',
version='0.5.0',
description='Populate your github contribution graph',
author='tickelton',
author_email='tickelton@gmail.com',
url='https://github.com/tickelton/ghdecoy',
license='ISC',
scripts=['ghdecoy.py'],
cmdclass={
'test': RunTests,
'coverage_run': CoverageRun,
'coverage_report': CoverageReport,
'install': GHDInstall,
},
)