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

support for pypy #209

Closed
cholin opened this issue Apr 19, 2013 · 3 comments · Fixed by #327
Closed

support for pypy #209

cholin opened this issue Apr 19, 2013 · 3 comments · Fixed by #327

Comments

@cholin
Copy link

cholin commented Apr 19, 2013

At the moment pygit2 supports python 2.6, 2.7, 3.1, 3.2 and 3.3. Sadly pypy is not supported yet. I would be happy if we could refactor the code of pygit2 a little bit to support pypy as well. If you try the test suite with pypy you get the following error:

src/pygit2.c:30:20: fatal error: osdefs.h: No such file or directory #include <osdefs.h>

I think the issue are

  • missing osdefs.h in pypy (there is a private ll_os.h but not public accessable)
  • we check for key value parameters in several functions but do specify METH_VARARGS in the PyMethodDef struct. It should be redudant and not compatible with pypy.
  • pypy raises TypeError instead of AttributeError (see https://bugs.pypy.org/issue1108)
  • memory bugs in pygit2

Do you think it's worth the time?

@jdavid
Copy link
Member

jdavid commented Apr 19, 2013

It would be nice:

  • if there is someone who takes care of it, because I won't
  • if the changes are not too heavy (from your description it looks okey to me)

Also, it looks like travis does support pypy, that will help a lot.

So go ahead if you like.

@jdavid
Copy link
Member

jdavid commented Apr 20, 2013

Maybe we could reduce the mess by having specific files to support each platform, like _py2.h, _py3.h and ... _pypy.h.

@cholin
Copy link
Author

cholin commented Apr 20, 2013

I'll look into 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.

2 participants