Skip to content

Commit 63b0c6b

Browse files
authored
Merge pull request #241 from python-cmd2/windows_pyreadline
Added a Windows-only dependency on pyreadline
2 parents 5109cd0 + da099c2 commit 63b0c6b

File tree

6 files changed

+41
-3
lines changed

6 files changed

+41
-3
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ install:
44
build: off
55

66
test_script:
7-
- python -m tox -e py27,py35,py36-win
7+
- python -m tox -e py27-win,py35-win,py36-win

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Fixed a couple broken examples
55
* Enhancements
66
* Improved documentation for modifying shortcuts (command aliases)
7-
7+
* Made ``pyreadline`` a dependency on Windows to ensure tab-completion works
8+
89
## 0.7.8 (November 8, 2017)
910

1011
* Bug Fixes

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ pip install -U cmd2
4848

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

5354
For information on other installation options, see
5455
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/install.html) in the cmd2

docs/install.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ the following Python packages are installed:
107107
* pyparsing
108108
* pyperclip
109109

110+
On Windows, there is an additional dependency:
111+
112+
* pyreadline
113+
110114

111115
Upgrading cmd2
112116
--------------

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
Setuptools setup file, used to install or test 'cmd2'
55
"""
6+
import sys
67
from setuptools import setup
78

89
VERSION = '0.7.9a'
@@ -61,6 +62,9 @@
6162
""".splitlines())))
6263

6364
INSTALL_REQUIRES = ['pyparsing >= 2.0.1', 'pyperclip', 'six']
65+
if sys.platform.startswith('win'):
66+
INSTALL_REQUIRES += ['pyreadline']
67+
6468
# unittest.mock was added in Python 3.3. mock is a backport of unittest.mock to all versions of Python
6569
TESTS_REQUIRE = ['mock', 'pytest']
6670
DOCS_REQUIRE = ['sphinx', 'sphinx_rtd_theme', 'pyparsing', 'pyperclip', 'six']

tox.ini

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ commands =
2424
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
2525
codecov
2626

27+
[testenv:py27-win]
28+
deps =
29+
codecov
30+
mock
31+
pyparsing
32+
pyperclip
33+
pyreadline
34+
pytest
35+
pytest-cov
36+
pytest-xdist
37+
six
38+
subprocess32
39+
commands =
40+
py.test {posargs: -n 2} --cov=cmd2 --cov-report=term-missing
41+
codecov
42+
2743
[testenv:py33]
2844
deps =
2945
mock
@@ -54,6 +70,17 @@ deps =
5470
six
5571
commands = py.test -v -n2
5672

73+
[testenv:py35-win]
74+
deps =
75+
mock
76+
pyparsing
77+
pyperclip
78+
pyreadline
79+
pytest
80+
pytest-xdist
81+
six
82+
commands = py.test -v -n2
83+
5784
[testenv:py36]
5885
deps =
5986
codecov
@@ -73,6 +100,7 @@ deps =
73100
mock
74101
pyparsing
75102
pyperclip
103+
pyreadline
76104
pytest
77105
pytest-xdist
78106
six

0 commit comments

Comments
 (0)