Skip to content

Commit 6be3807

Browse files
committed
unittest2 is only a test requirement
1 parent 7a490aa commit 6be3807

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Diff for: .travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ env:
99
- DB=mysql57
1010
- DB=mysql56
1111
install:
12-
- "pip install ."
13-
- "pip install nose"
12+
# Needs a newer version of pip to do the pip installation line
13+
- pip install pip --upgrade
14+
- pip install .[test] nose
1415
cache: apt
1516
before_script:
1617
- env | grep DB

Diff for: setup.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
import sys
1010

11-
install_requires = ['pymysql']
11+
tests_require = []
1212

13-
# add unittest2 to install_requires for python < 2.7
13+
# add unittest2 to tests_require for python < 2.7
1414
if sys.version_info < (2, 7):
15-
install_requires.append("unittest2")
15+
tests_require.append("unittest2")
1616

1717

1818
class TestCommand(Command):
@@ -49,5 +49,6 @@ def run(self):
4949
"pymysqlreplication.constants",
5050
"pymysqlreplication.tests"],
5151
cmdclass={"test": TestCommand},
52-
install_requires=install_requires,
52+
extras_require={'test': tests_require},
53+
install_requires=['pymysql'],
5354
)

0 commit comments

Comments
 (0)