{"action":"created","issue":{"url":"https://api.github.com/repos/HomerReid/scuff-em/issues/63","labels_url":"https://api.github.com/repos/HomerReid/scuff-em/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/HomerReid/scuff-em/issues/63/comments","events_url":"https://api.github.com/repos/HomerReid/scuff-em/issues/63/events","html_url":"https://github.com/HomerReid/scuff-em/issues/63","id":110236415,"number":63,"title":"Python interface fails to compile with python 3.4","user":{"login":"gevero","id":7213490,"avatar_url":"https://avatars.githubusercontent.com/u/7213490?v=3","gravatar_id":"","url":"https://api.github.com/users/gevero","html_url":"https://github.com/gevero","followers_url":"https://api.github.com/users/gevero/followers","following_url":"https://api.github.com/users/gevero/following{/other_user}","gists_url":"https://api.github.com/users/gevero/gists{/gist_id}","starred_url":"https://api.github.com/users/gevero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gevero/subscriptions","organizations_url":"https://api.github.com/users/gevero/orgs","repos_url":"https://api.github.com/users/gevero/repos","events_url":"https://api.github.com/users/gevero/events{/privacy}","received_events_url":"https://api.github.com/users/gevero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-07T14:22:58Z","updated_at":"2015-10-08T08:12:08Z","closed_at":null,"body":"While compiling scuff-em on my linux box, python interface compiles successfully only under python 2.7.  The arising errors with python 3.4 (the ones I was able to find at least) are as follows:\r\n\r\nscuff-python.cpp:2452: error: ‘PyCObject_Import’ was not declared in this scope\r\nscuff-python.cpp:2521: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope\r\nscuff-python.cpp:2544: error: ‘PyCObject_AsVoidPtr’ was not declared in this scope\r\nscuff-python.cpp:2549: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope\r\nscuff-python.cpp:2901: error: ‘PyString_Check’ was not declared in this scope\r\n\r\nBest\r\n\r\nGiovanni"},"comment":{"url":"https://api.github.com/repos/HomerReid/scuff-em/issues/comments/146451910","html_url":"https://github.com/HomerReid/scuff-em/issues/63#issuecomment-146451910","issue_url":"https://api.github.com/repos/HomerReid/scuff-em/issues/63","id":146451910,"user":{"login":"jfeist","id":2112929,"avatar_url":"https://avatars.githubusercontent.com/u/2112929?v=3","gravatar_id":"","url":"https://api.github.com/users/jfeist","html_url":"https://github.com/jfeist","followers_url":"https://api.github.com/users/jfeist/followers","following_url":"https://api.github.com/users/jfeist/following{/other_user}","gists_url":"https://api.github.com/users/jfeist/gists{/gist_id}","starred_url":"https://api.github.com/users/jfeist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfeist/subscriptions","organizations_url":"https://api.github.com/users/jfeist/orgs","repos_url":"https://api.github.com/users/jfeist/repos","events_url":"https://api.github.com/users/jfeist/events{/privacy}","received_events_url":"https://api.github.com/users/jfeist/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T08:12:08Z","updated_at":"2015-10-08T08:12:08Z","body":"As far as I know, swig is independent of the python version/distribution. It is not a part of python, and does not itself look for or use python headers etc. The generated .cpp file contains some #if statements that check the python version, such as\r\n```C++\r\n/* Compatibility macros for Python 3 */\r\n#if PY_VERSION_HEX >= 0x03000000\r\n#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)\r\n...\r\n```\r\nSo the swig-generated .cpp file should compile with any version of python. However, my guess is that the swig version has to be new enough to generate a header compatible with newer pythons (hence my question about the version of swig Giovanni is using).\r\n\r\n(Note that you __can__ pass -py3 as an extra flag to swig, but that only turns on some features that are only supported in python 3, so the .cpp then will not compile with python 2. The flag is not necessary to get a .cpp that is compatible with python 3)."}}