-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathsetup.py
More file actions
44 lines (34 loc) · 985 Bytes
/
Copy pathsetup.py
File metadata and controls
44 lines (34 loc) · 985 Bytes
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
import sys
import glob
from distutils.core import setup
SETUP_ARGS = dict(
name='HeadFirstDesignPatterns',
version='0.1.0',
author='Dan Buch',
author_email='daniel.buch@gmail.com',
url='http://github.com/meatballhat/HeadFirstDesignPatterns/downloads',
description='python versions of Java examples '
'from the Head First Design Patterns book',
long_description='',
packages=[
'headfirst',
'headfirst.strategy',
'headfirst.observer',
'headfirst.tests',
],
scripts=[],
)
def main():
if sys.argv[1:] and sys.argv[1] == 'test':
return run_tests()
SETUP_ARGS.update(dict(
scripts=glob.glob('scripts/*'),
))
setup(**SETUP_ARGS)
return 0
def run_tests():
from headfirst.tests._runner import run_suite
verbose = '--verbose' in sys.argv or '-v' in sys.argv
return run_suite(verbose=verbose)
if __name__ == '__main__':
sys.exit(main())