forked from PyMySQL/PyMySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
45 lines (36 loc) · 1.06 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
try:
from setuptools import setup, Command
except ImportError:
from distutils.core import setup, Command
import sys
class TestCommand(Command):
user_options = [ ]
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
'''
Finds all the tests modules in tests/, and runs them.
'''
from pymysql import tests
import unittest
unittest.main(tests, argv=sys.argv[:1])
version_tuple = __import__('pymysql').VERSION
if version_tuple[2] is not None:
version = "%d.%d_%s" % version_tuple
else:
version = "%d.%d" % version_tuple[:2]
setup(
name = "PyMySQL",
version = version,
url = 'http://code.google.com/p/pymysql',
author = 'yutaka.matsubara',
author_email = '[email protected]',
maintainer = 'Pete Hunt',
maintainer_email = '[email protected]',
description = 'Pure Python MySQL Driver ',
license = "MIT",
packages = ['pymysql', 'pymysql.constants', 'pymysql.tests'],
cmdclass = {'test': TestCommand},
)