Skip to content

Commit b8609af

Browse files
Add setup.py
1 parent df857cf commit b8609af

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

pymysqlreplication/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919
limitations under the License.
2020
'''
2121

22+
VERSION = (0, 0, 1)
23+
2224
from binlogstream import BinLogStreamReader

setup.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
try:
2+
from setuptools import setup, Command
3+
except ImportError:
4+
from distutils.core import setup, Command
5+
6+
import sys
7+
8+
class TestCommand(Command):
9+
user_options = [ ]
10+
11+
def initialize_options(self):
12+
pass
13+
14+
def finalize_options(self):
15+
pass
16+
17+
def run(self):
18+
'''
19+
Finds all the tests modules in tests/, and runs them.
20+
'''
21+
from pymysqlreplication import tests
22+
import unittest
23+
unittest.main(tests, argv=sys.argv[:1])
24+
25+
version_tuple = __import__('pymysqlreplication').VERSION
26+
27+
version = "%d.%d.%d" % version_tuple
28+
29+
setup(
30+
name = "PyMySQLReplication",
31+
version = version,
32+
url = 'https://github.com/noplay/python-mysql-replication',
33+
author = 'Julien Duponchelle',
34+
author_email = '[email protected]',
35+
description = 'Pure Python Implementation of MySQL replication protocol build on top of PyMYSQL.',
36+
license = "Apache 2",
37+
packages = ['pymysqlreplication', 'pymysqlreplication.constants', 'pymysqlreplication.tests'],
38+
cmdclass = {'test': TestCommand},
39+
requires = ['pymysql'],
40+
)

0 commit comments

Comments
 (0)