forked from pygobject/pgi-docgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·47 lines (39 loc) · 1.39 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
#!/usr/bin/python
# Copyright 2015 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
from distutils.core import setup, Command
class TestCommand(Command):
description = "run unit tests"
user_options = [
("filter=", None, "regexp for filter classes"),
("exitfirst", "x", "exit instantly on first error or failed test"),
]
def initialize_options(self):
self.filter = ""
self.exitfirst = False
def finalize_options(self):
self.filter = str(self.filter)
self.exitfirst = bool(self.exitfirst)
def run(self):
from tests import do_test
exit(do_test(self.filter, self.exitfirst) != 0)
setup(name='pgidocgen',
version="0.0.1",
description='Docs Generator for PGI/PyGObject',
author='Christoph Reiter',
author_email='reiter.christoph@gmail.com',
url='https://github.com/lazka/pgi-docgen',
scripts=['pgi-docgen.py', 'pgi-docgen-build.py'],
packages=[
'pgidocgen',
'pgidocgen.gen',
],
package_data={'pgidocgen': ['data/*', 'data/*/*', 'data/*/*/*']},
license='LGPL-2.1+',
cmdclass={
'test': TestCommand,
})