Skip to content

Commit 7f404db

Browse files
committed
Properly documented the dependency on wcwidth
tableformatter depends on wcwidth for all OSes, not use POSIX OSes. - setup.py and README.md have been updated accordingly - was also able to remove wcwidth from tox.ini since it is a full-blown dependency now
1 parent d670dd1 commit 7f404db

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ pip install tableformatter
2525

2626
Dependencies
2727
------------
28-
``tableformatter`` does not have any required dependencies.
28+
``tableformatter`` depends on the [wcwidth](https://github.com/jquast/wcwidth) module for measuring the width of
29+
unicode strings rendered to a terminal.
2930

30-
However, if you wish to use the provided optional support for color, then at least one of the following two modules must be installed:
31+
If you wish to use the optional support for color, then at least one of the following two modules must be installed:
3132
* [colorama](https://github.com/tartley/colorama)
3233
* [colored](https://github.com/dslackw/colored)
3334

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
Topic :: Software Development :: Libraries :: Python Modules
3131
""".splitlines())))
3232

33+
INSTALL_REQUIRES = ['wcwidth']
34+
3335
EXTRAS_REQUIRE = {
34-
# POSIX OSes also require wcwidth for correctly estimating the displayed width of unicode chars
35-
":sys_platform!='win32'": ['wcwidth'],
36-
# Python 3.4 and earlier the typing module backport for optional type hinting support
36+
# Python 3.4 and earlier require the typing module backport for type hinting support
3737
":python_version<'3.5'": ['typing'],
3838
# development only dependencies - install with 'pip install -e .[dev]'
3939
'dev': [
@@ -56,5 +56,6 @@
5656
py_modules = ['tableformatter'],
5757
keywords='table tabular formatter',
5858
python_requires='>=3.4',
59+
install_requires=INSTALL_REQUIRES,
5960
extras_require=EXTRAS_REQUIRE,
6061
)

tox.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ deps =
1515
pytest
1616
pytest-cov
1717
pytest-mock
18-
wcwidth
1918
commands =
2019
py.test {posargs} --cov
2120
codecov
@@ -25,7 +24,6 @@ deps =
2524
mock
2625
pytest
2726
pytest-mock
28-
wcwidth
2927
commands = py.test -v
3028

3129
[testenv:py35-win]
@@ -40,7 +38,6 @@ deps =
4038
pytest
4139
pytest-cov
4240
pytest-mock
43-
wcwidth
4441
commands =
4542
py.test {posargs} --cov
4643
codecov
@@ -58,6 +55,5 @@ commands =
5855
deps =
5956
pytest
6057
pytest-mock
61-
wcwidth
6258
commands = py.test -v
6359

0 commit comments

Comments
 (0)