circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.54k stars 257 forks source link

curses not available on windows #1100

Open ltalirz opened 5 years ago

ltalirz commented 5 years ago

As noticed in the circus feedstock on conda-forge, circus uses curses but it seems curses doesn't work on windows (?).

In this issue, it was mentioned that circus supports windows since version 0.12, so it seems like we are missing something. How should we build the circus conda package for windows?

possible workarounds

Mentioning also the recipe maintainer @carlodri

ltalirz commented 4 years ago

It seems to me that the curses library is used in three lines of code only, using two functions: https://github.com/circus-tent/circus/blob/6ca0d18bd53fc5de0358921f45fbbd609a884f6a/circus/stats/client.py#L89 https://github.com/circus-tent/circus/blob/6ca0d18bd53fc5de0358921f45fbbd609a884f6a/circus/stats/client.py#L234

(introduced in commit https://github.com/circus-tent/circus/commit/7d062b533daf564d9ff769b588037ff932cc888d ).

Given that this currently blocks the windows build of circus on conda-forge, it would be great to understand whether this is really necessary or whether endwin() and initscr() can be replaced by something supported on windows.

Mentioning @tarekziade for comment (and @sphuber for info)

Edit: Fixed commit hash

nuno-andre commented 4 years ago

There are some wheels based on PDCurses to support curses library in Windows. It may help.

ltalirz commented 4 years ago

Thansk @nuno-andre

So, I guess the idea would be to

Is it possible to create a conda-forge feedstock from a python wheel or does the wheel need to be built by conda? Apparently you can with conda, just wondering whether there is an example of this on conda-forge...

nuno-andre commented 4 years ago

It think the best option would be to go with setuptools by adding the platform dependent requirement to setup.py:

install_requires = [
    'psutil', 
    'pyzmq>=17.0',
    'tornado>=3.0,<5.0',
    'six',
    'windows-curses>=2.10;platform_system=="Windows"',
]

This way both pip and conda will be able to install the wheels.

It may also be worth merging #1065 to get better Windows support.