Open nussbrot opened 5 years ago
Thanks for considering Ronin, am happy to help make it work better for you.
The whole point of Blessings, I thought, was to allow support for multi-platforms. Have you actually tried it in Windows? What error do you get? It's definitely possible to make it optional.
Yes, i have tried it on Windows. The error is:
PS D:\entwicklung\ronin> python .\build.py
Traceback (most recent call last):
File ".\build.py", line 1, in <module>
from ronin.cli import cli
File "D:\tools\Python3.6.5-amd64\lib\site-packages\ronin\cli.py", line 17, in <module>
from .contexts import current_context
File "D:\tools\Python3.6.5-amd64\lib\site-packages\ronin\contexts.py", line 20, in <module>
from .utils.messages import error
File "D:\tools\Python3.6.5-amd64\lib\site-packages\ronin\utils\messages.py", line 18, in <module>
from blessings import Terminal
File "D:\tools\Python3.6.5-amd64\lib\site-packages\blessings\__init__.py", line 7, in <module>
from fcntl import ioctl
ModuleNotFoundError: No module named 'fcntl'
I don't know about blessings multi-platform capabilities, but it tries to include fcntl, which is not portable, afaik. See here for example.
If I can help you somehow let me know.
Also, you cannot simply install fcntl on Windows:
PS D:\entwicklung\ronin> pip install fcntl
Looking in indexes: https://pypi.org/simple
Collecting fcntl
Could not find a version that satisfies the requirement fcntl (from versions: )
No matching distribution found for fcntl
Thanks, very clear. Do you feel like tackling this yourself and submitting a PR? If not, I might find time next week. I don't think it should be too hard to figure out how to make colors work on both Windows and *nix.
I have solved this uninstalling "blessing" and installing "blessed" https://pypi.org/project/blessed/ then in \site-packages\ronin\utils\messages.py at line 18 changing "from blessings import Terminal" to "from blessed import Terminal"
@riccardolasagno That's great! Could you submit a pull request, please?
Hi,
i'm evaluating ronin as a possible build system for a FPGA project. One of my needs is that it works on Linux and Windows. That's why i look for build systems based on python.
ronin uses blessings, which in turn uses fcntl. Both of these modules are not cross-platform. I'm wondering why you're using those modules and if you intended ronin to be cross-platform?
At least your PyPI entry has the tag 'OS Independent'.