diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-22 00:33:26 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-22 00:33:26 -0500 |
commit | 6c2cdf229dd62a957d7e27533725a9cc013db22e (patch) | |
tree | b426400b79068713c75dc281112d7c80da16e328 /setup.py | |
parent | f28c10a50535f753419bd2120ac6cb0bea9f56e2 (diff) | |
download | cmd2-git-6c2cdf229dd62a957d7e27533725a9cc013db22e.tar.gz |
redirect_stderr wasn't added to contextlib until Python 3.5
So it turns out that we need contextlib2 for Python 3.4 and earlier.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -67,9 +67,13 @@ INSTALL_REQUIRES = ['pyparsing >= 2.0.1', 'pyperclip', 'six'] if sys.platform.startswith('win'): INSTALL_REQUIRES += ['pyreadline'] -# Python 2.7 also requires contextlib2 for temporarily redirecting stdout and stderr and subprocess32 +# Python 3.4 and earlier require contextlib2 for temporarily redirecting stderr and stdout +if sys.version_info < (3, 5): + INSTALL_REQUIRES += ['contextlib2'] + +# Python 2.7 also requires subprocess32 if sys.version_info < (3, 0): - INSTALL_REQUIRES += ['contextlib2', 'subprocess32'] + INSTALL_REQUIRES += ['subprocess32'] # unittest.mock was added in Python 3.3. mock is a backport of unittest.mock to all versions of Python TESTS_REQUIRE = ['mock', 'pytest'] |