Skip to content

Commit

Permalink
Do not automatically install windows-curses on Windows
Browse files Browse the repository at this point in the history
It breaks installation with pip on MSYS2, and Kconfiglib can still be
useful without the terminal menuconfig.

Unfortunately, MSYS2 seems tricky to identify via environment markers
(https://www.python.org/dev/peps/pep-0508/#environment-markers).

This has breakage/annoyance potential, as windows-curses now needs to be
installed manually. The major Kconfiglib version will be increased.
Sorry if this change caused problems!

Fixes: #77
  • Loading branch information
ulfalizer committed Oct 5, 2019
1 parent bc6345d commit 21b4c1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
10 changes: 4 additions & 6 deletions README.rst
Expand Up @@ -126,9 +126,9 @@ Manual installation
~~~~~~~~~~~~~~~~~~~

Just drop ``kconfiglib.py`` and the scripts you want somewhere. There are no
third-party dependencies (except for the `windows-curses
<https://github.com/zephyrproject-rtos/windows-curses>`_ package on Windows,
when running the terminal ``menuconfig`` implementation).
third-party dependencies, but the terminal ``menuconfig`` won't work on Windows
unless a package like `windows-curses
<https://github.com/zephyrproject-rtos/windows-curses>`_ is installed.

Installation for the Linux kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -507,9 +507,7 @@ Three configuration interfaces are currently available:

There are no third-party dependencies on \*nix. On Windows,
the ``curses`` modules is not available by default, but support
can be added by installing the ``windows-curses`` package (which is
installed automatically when Kconfiglib is installed via ``pip``
on Windows):
can be added by installing the ``windows-curses`` package:

.. code-block:: shell
Expand Down
9 changes: 4 additions & 5 deletions menuconfig.py
Expand Up @@ -174,12 +174,11 @@
Limitations
===========
Doesn't work out of the box on Windows, but can be made to work with 'pip
install windows-curses'. See the
https://github.com/zephyrproject-rtos/windows-curses repository.
Doesn't work out of the box on Windows, but can be made to work with
'pip install kconfiglib' on Windows automatically installs windows-curses
to make the menuconfig usable.
pip install windows-curses
See the https://github.com/zephyrproject-rtos/windows-curses repository.
"""
from __future__ import print_function

Expand Down
8 changes: 2 additions & 6 deletions setup.py
Expand Up @@ -61,12 +61,8 @@
)
},

# The terminal menuconfig implementation uses the standard Python 'curses'
# module. The windows-curses package makes it available on Windows. See
# https://github.com/zephyrproject-rtos/windows-curses.
install_requires=(
'windows-curses; sys_platform == "win32"',
),
# Note: windows-curses is not automatically installed on Windows anymore,
# because it made Kconfiglib impossible to install on MSYS2 with pip

# Needs support for unnumbered {} in format() and argparse
python_requires=">=2.7,!=3.0.*,!=3.1.*",
Expand Down

0 comments on commit 21b4c1e

Please sign in to comment.