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

Python3 compatibility #888

Open
nim65s opened this issue Nov 27, 2018 · 1 comment · May be fixed by #889
Open

Python3 compatibility #888

nim65s opened this issue Nov 27, 2018 · 1 comment · May be fixed by #889

Comments

@nim65s
Copy link

nim65s commented Nov 27, 2018

Hi,

I got this compilation error, on a Raspberry Pi with ArchLinux ARM (as Raspbian has a version of Qt5 that is too old):

/home/alarm/aseba/enki/python/enki.cpp: In static member function 'static void* Vector_from_python::convertible(PyObject*)':
/home/alarm/aseba/enki/python/enki.cpp:108:34: error: 'PyInt_Check' was not declared in this scope
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                  ^~~~~~~~~~~
/home/alarm/aseba/enki/python/enki.cpp:108:34: note: suggested alternative: 'PySet_Check'
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                  ^~~~~~~~~~~
                                  PySet_Check
/home/alarm/aseba/enki/python/enki.cpp:112:34: error: 'PyInt_Check' was not declared in this scope
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                  ^~~~~~~~~~~
/home/alarm/aseba/enki/python/enki.cpp:112:34: note: suggested alternative: 'PySet_Check'
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                  ^~~~~~~~~~~
                                  PySet_Check
/home/alarm/aseba/enki/python/enki.cpp:123:34: error: 'PyInt_Check' was not declared in this scope
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                  ^~~~~~~~~~~
/home/alarm/aseba/enki/python/enki.cpp:123:34: note: suggested alternative: 'PySet_Check'
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                  ^~~~~~~~~~~
                                  PySet_Check
/home/alarm/aseba/enki/python/enki.cpp:127:34: error: 'PyInt_Check' was not declared in this scope
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                  ^~~~~~~~~~~
/home/alarm/aseba/enki/python/enki.cpp:127:34: note: suggested alternative: 'PySet_Check'
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                  ^~~~~~~~~~~
                                  PySet_Check

So it seems that this package is not yet compatible with Python 3, right ?

Therefore, I suggest either to make it compatible, or to raise an issue in CMake if PYTHON_VERSION_MAJOR > 2.

Also, this could be documented, and adding -DPYTHON_EXECUTABLE=$(which python2) should be enough to workaround this.

@nim65s
Copy link
Author

nim65s commented Nov 27, 2018

Ok, enki is a submodule, and the issue has already been reported: enki-community/enki#8

Still, I think that we should document that.

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

Successfully merging a pull request may close this issue.

1 participant