Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ronin does not work on windows #4

Open
nussbrot opened this issue Feb 18, 2019 · 6 comments
Open

ronin does not work on windows #4

nussbrot opened this issue Feb 18, 2019 · 6 comments

Comments

@nussbrot
Copy link

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'.

@tliron
Copy link
Owner

tliron commented Feb 18, 2019

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.

@nussbrot
Copy link
Author

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.

@nussbrot
Copy link
Author

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

@tliron
Copy link
Owner

tliron commented Feb 19, 2019

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.

@riccardolasagno
Copy link

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"

@tliron
Copy link
Owner

tliron commented May 4, 2020

@riccardolasagno That's great! Could you submit a pull request, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants