Skip to content

unittest2 is only a test requirement #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ env:
- DB=mysql57
- DB=mysql56
install:
- "pip install ."
- "pip install nose"
# Needs a newer version of pip to do the pip installation line
- pip install pip --upgrade
- pip install .[test] nose
cache: apt
before_script:
- env | grep DB
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import sys

install_requires = ['pymysql']
tests_require = []

# add unittest2 to install_requires for python < 2.7
# add unittest2 to tests_require for python < 2.7
if sys.version_info < (2, 7):
install_requires.append("unittest2")
tests_require.append("unittest2")


class TestCommand(Command):
Expand Down Expand Up @@ -49,5 +49,6 @@ def run(self):
"pymysqlreplication.constants",
"pymysqlreplication.tests"],
cmdclass={"test": TestCommand},
install_requires=install_requires,
extras_require={'test': tests_require},
install_requires=['pymysql'],
)