Skip to content

Commit 89c395f

Browse files
HnasarHashem Nasaratzariiii9003
authored
Move windows-curses dependency to an optional extra (#1395)
* Move windows-curses dependency to an optional extra Python 3.11 wheels for windows-curses are [not yet available][1], and this meant that python-can could not be installed on windows with Python 3.11. Since windows-curses is only used in viewer.py, change the dependnecy to an optional extra. [1]: zephyrproject-rtos/windows-curses#31 * change python3 to python for Windows Co-authored-by: Hashem Nasarat <[email protected]> Co-authored-by: zariiii9003 <[email protected]>
1 parent 23b6b19 commit 89c395f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

doc/installation.rst

+10
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ If ``python-can`` is already installed, the CANtact backend can be installed sep
103103

104104
Additional CANtact documentation is available at `cantact.io <https://cantact.io>`__.
105105

106+
CanViewer
107+
~~~~~~~~~
108+
109+
``python-can`` has support for showing a simple CAN viewer terminal application
110+
by running ``python -m can.viewer``. On Windows, this depends on the
111+
`windows-curses library <https://pypi.org/project/windows-curses/>`__ which can
112+
be installed with:
113+
114+
``python -m pip install "python-can[viewer]"``
115+
106116
Installing python-can in development mode
107117
-----------------------------------------
108118

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"gs_usb": ["gs_usb>=0.2.1"],
3434
"nixnet": ["nixnet>=0.3.1"],
3535
"pcan": ["uptime~=3.0.1"],
36+
"viewer": [
37+
'windows-curses;platform_system=="Windows" and platform_python_implementation=="CPython"'
38+
],
3639
}
3740

3841
setup(
@@ -86,7 +89,6 @@
8689
install_requires=[
8790
"setuptools",
8891
"wrapt~=1.10",
89-
'windows-curses;platform_system=="Windows" and platform_python_implementation=="CPython"',
9092
"typing_extensions>=3.10.0.0",
9193
'pywin32;platform_system=="Windows" and platform_python_implementation=="CPython"',
9294
'msgpack~=1.0.0;platform_system!="Windows"',

0 commit comments

Comments
 (0)