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

Using 'python' binary for Python 2 #47

Open
zatherz opened this issue Apr 29, 2017 · 3 comments
Open

Using 'python' binary for Python 2 #47

zatherz opened this issue Apr 29, 2017 · 3 comments

Comments

@zatherz
Copy link

zatherz commented Apr 29, 2017

PEP 394 recommends the usage of python2 when invoking Python 2 scripts instead of python, as the latter might be different depending on the distribution (and indeed it is - it's Python 3 in Arch Linux).

@fay59
Copy link
Owner

fay59 commented Apr 30, 2017

Which script(s) are you talking about?

@zatherz
Copy link
Author

zatherz commented Apr 30, 2017

Upon further inspection, it seems that it's actually cmake generating it like that.

[  3%] Built target emu
[  4%] Generating bindings.cpp
  File "/home/zatherz/fcd/fcd/python/bindings.py", line 131
    raise ValueError, "callback type %s" % cFunction.returnType
                    ^
SyntaxError: invalid syntax
make[2]: *** [CMakeFiles/fcd.dir/build.make:62: bindings.cpp] Error 1
make[2]: *** Deleting file 'bindings.cpp'
make[1]: *** [CMakeFiles/Makefile2:67: CMakeFiles/fcd.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

@fay59
Copy link
Owner

fay59 commented May 1, 2017

The script comes from fcd/python/bindings.py (but doesn't have a shebang). It might not be a ton of effort to make it 2-3 compatible. Would you like to do it?

With that said, fcd itself is likely to keep linking against Python 2 for a while.

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