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

windows support #7

Open
digcat opened this issue May 30, 2016 · 4 comments
Open

windows support #7

digcat opened this issue May 30, 2016 · 4 comments

Comments

@digcat
Copy link

digcat commented May 30, 2016

to enable windows to work with grua, the find_bridge_ip function doesnt work in a windows environment, perhaps netifaces would be a better way?

$ ./grua
File not found
Traceback (most recent call last):
File "./grua", line 3, in
from grua import grua
File "build\bdist.win-amd64\egg\grua\grua.py", line 7, in
File "build\bdist.win-amd64\egg\grua\util.py", line 70, in find_bridge_ip
Exception: Could not find either 'ip' or 'ifconfig' in PATH

https://pypi.python.org/pypi/netifaces

def find_bridge_ip():

try:
    command = ["ip", "addr", "show", "dev", "docker0"]
    sp = subprocess.Popen(command, stdout=subprocess.PIPE)

    output = subprocess.check_output(('grep', 'inet'), stdin=sp.stdout).strip().split()[1].split('/')[0]

    done = True
@marsbard
Copy link
Owner

Happy to take pull requests to make windows work as long as they don't break current functionality but unfortunately my windows system won't run docker so I cannot test

@digcat
Copy link
Author

digcat commented May 30, 2016

yes, just got docker windows installed, so flushing out issues which
will come up. was looking at that library as a possible work around, it
demands install a vc++ compiler, but installs cleanly on 27.

On 30/05/2016 12:14, Martin Cosgrave wrote:

Happy to take pull requests to make windows work as long as they don't
break current functionality but unfortunately my windows system won't
run docker so I cannot test


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AEn3Zqv5grkfy0NL_4Ye6gfNNeGjo-IUks5qGsapgaJpZM4IpkE3.

@digcat
Copy link
Author

digcat commented Jun 8, 2016

latest pull i get

$ ./grua
Traceback (most recent call last):
File "./grua", line 3, in
from grua import grua
File "build\bdist.win-amd64\egg\grua\grua.py", line 7, in
File "build\bdist.win-amd64\egg\grua\util.py", line 71, in find_bridge_ip
UnboundLocalError: local variable 'sp' referenced before assignment

@marsbard
Copy link
Owner

marsbard commented Jun 8, 2016

grr it needs a tab at line 71

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

2 participants