This repository has been archived by the owner on Jan 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
executable file
·71 lines (58 loc) · 1.95 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
#!/usr/bin/env python
from distutils.core import setup
from distutils.cmd import Command
import os
import re
import subprocess
import sys
_dir_ = os.path.dirname(__file__)
class test(Command):
description = "run tests"
user_options = [
('tests=', 't', 'test names, separated by commas'),
]
def initialize_options(self):
self.tests = None
def finalize_options(self):
if self.tests is not None:
self.tests = re.split('[, ]+', self.tests)
def run(self):
"""Run test/tests.py and quit with exit status"""
progname = os.path.join(_dir_, 'run-tests.py')
cmd = [sys.executable, progname]
if self.verbose == 0:
cmd.append('--quiet')
elif self.verbose >= 2:
cmd.append('--verbose')
if self.tests:
cmd.extend(self.tests)
retcode = subprocess.call(cmd)
if retcode != 0:
sys.exit(retcode)
def long_description():
sys.path.insert(0, _dir_)
import grandfatherson
return grandfatherson.__doc__
setup(name='GrandFatherSon',
version='1.3',
description='Grandfather-father-son backup rotation calculator',
long_description=long_description(),
author='Ecometrica',
author_email='[email protected]',
url='http://github.com/ecometrica/grandfatherson/',
packages=['grandfatherson'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Archiving',
],
license='BSD License',
cmdclass={'test': test},
)