Skip to content

Commit 9fa98a5

Browse files
author
Hashem Nasarat
committed
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
1 parent c3a5c7a commit 9fa98a5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-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+
``python3 -m pip install "python-can[viewer]"``
115+
106116
Installing python-can in development mode
107117
-----------------------------------------
108118

setup.py

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

3839
setup(
@@ -86,7 +87,6 @@
8687
install_requires=[
8788
"setuptools",
8889
"wrapt~=1.10",
89-
'windows-curses;platform_system=="Windows" and platform_python_implementation=="CPython"',
9090
"typing_extensions>=3.10.0.0",
9191
'pywin32;platform_system=="Windows" and platform_python_implementation=="CPython"',
9292
'msgpack~=1.0.0;platform_system!="Windows"',

0 commit comments

Comments
 (0)