Skip to content

Commit

Permalink
Merge pull request #241 from python-cmd2/windows_pyreadline
Browse files Browse the repository at this point in the history
Added a Windows-only dependency on pyreadline
  • Loading branch information
tleonhardt authored Nov 16, 2017
2 parents 5109cd0 + da099c2 commit 63b0c6b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ install:
build: off

test_script:
- python -m tox -e py27,py35,py36-win
- python -m tox -e py27-win,py35-win,py36-win
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Fixed a couple broken examples
* Enhancements
* Improved documentation for modifying shortcuts (command aliases)

* Made ``pyreadline`` a dependency on Windows to ensure tab-completion works

## 0.7.8 (November 8, 2017)

* Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ pip install -U cmd2

cmd2 works with Python 2.7 and Python 3.3+ on Windows, macOS, and Linux. It is pure Python code with
the only 3rd-party dependencies being on [six](https://pypi.python.org/pypi/six),
[pyparsing](http://pyparsing.wikispaces.com), and [pyperclip](https://github.com/asweigart/pyperclip).
[pyparsing](http://pyparsing.wikispaces.com), and [pyperclip](https://github.com/asweigart/pyperclip)
(on Windows, [pyreadline](https://pypi.python.org/pypi/pyreadline) is an additional dependency).

For information on other installation options, see
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/install.html) in the cmd2
Expand Down
4 changes: 4 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ the following Python packages are installed:
* pyparsing
* pyperclip

On Windows, there is an additional dependency:

* pyreadline


Upgrading cmd2
--------------
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
Setuptools setup file, used to install or test 'cmd2'
"""
import sys
from setuptools import setup

VERSION = '0.7.9a'
Expand Down Expand Up @@ -61,6 +62,9 @@
""".splitlines())))

INSTALL_REQUIRES = ['pyparsing >= 2.0.1', 'pyperclip', 'six']
if sys.platform.startswith('win'):
INSTALL_REQUIRES += ['pyreadline']

# unittest.mock was added in Python 3.3. mock is a backport of unittest.mock to all versions of Python
TESTS_REQUIRE = ['mock', 'pytest']
DOCS_REQUIRE = ['sphinx', 'sphinx_rtd_theme', 'pyparsing', 'pyperclip', 'six']
Expand Down
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ commands =
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
codecov

[testenv:py27-win]
deps =
codecov
mock
pyparsing
pyperclip
pyreadline
pytest
pytest-cov
pytest-xdist
six
subprocess32
commands =
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
codecov

[testenv:py33]
deps =
mock
Expand Down Expand Up @@ -54,6 +70,17 @@ deps =
six
commands = py.test -v -n2

[testenv:py35-win]
deps =
mock
pyparsing
pyperclip
pyreadline
pytest
pytest-xdist
six
commands = py.test -v -n2

[testenv:py36]
deps =
codecov
Expand All @@ -73,6 +100,7 @@ deps =
mock
pyparsing
pyperclip
pyreadline
pytest
pytest-xdist
six
Expand Down

0 comments on commit 63b0c6b

Please sign in to comment.