forked from nakagami/pydrda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
49 lines (40 loc) · 1.31 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
import sys
import unittest
from distutils.core import setup, Command
class TestCommand(Command):
user_options = [('db=', None, 'database type (derby|db2)')]
def initialize_options(self):
self.db = 'derby'
def finalize_options(self):
assert self.db in ('derby', 'db2'), 'Invalid database type!'
def run(self):
if self.db == 'derby':
from drda.tests import test_derby as test_module
elif self.db == 'db2':
from drda.tests import test_db2 as test_module
unittest.main(test_module, argv=sys.argv[:1])
cmdclass = {'test': TestCommand}
version = "%d.%d.%d" % __import__('drda').VERSION
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Database',
]
setup(
name="pydrda",
version=version,
url='https://github.com/nakagami/pydrda/',
classifiers=classifiers,
keywords=['Db2', 'Apache Derby'],
author='Hajime Nakagami',
author_email='[email protected]',
description='DRDA protocol database driver',
long_description=open('README.rst').read(),
license="MIT",
packages=['drda'],
cmdclass=cmdclass,
install_requires=['pyDes'],
)