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

pypy compatibility #4

Closed
mfiers opened this issue Jan 9, 2012 · 10 comments
Closed

pypy compatibility #4

mfiers opened this issue Jan 9, 2012 · 10 comments
Assignees
Milestone

Comments

@mfiers
Copy link

mfiers commented Jan 9, 2012

(uncertain if this is even possible)

It would be nice if this could be made compatible with pypy - which does not support getrefcount.

I'm trying to use gitpython/gitdb with pyp.

Thanks
Mark

@Byron
Copy link
Member

Byron commented Jan 10, 2012

Thanks for the information.

As getrefcount() caused and is causing a lot of troubles, as it appears to be somewhat unpredictable, I will have to remove it and implement an own refcounting mechanism. The maintenance is already scheduled, and should (ideally) happen within this month.

Cheers,
Sebastian

@mfiers
Copy link
Author

mfiers commented Jan 11, 2012

Thanks - I'll keep my eyes open..

@ghost ghost assigned Byron Jan 18, 2012
@brondsem
Copy link

Any updates on this? Just for reference, here's what I get when I try to install smmap with pypi

  Downloading/unpacking smmap==0.8.1 (from -r requirements-common.txt (line 59))
  Downloading smmap-0.8.1.tar.gz
  Running setup.py egg_info for package smmap
    Traceback (most recent call last):
      File "app_main.py", line 51, in run_toplevel
      File "app_main.py", line 534, in run_it
      File "<string>", line 14, in <module>
      File "/Users/brondsem/sf/pypy_allura_venv/build/smmap/setup.py", line 11, in <module>
        import smmap
      File "smmap/__init__.py", line 10, in <module>
        from mman import *
      File "smmap/mman.py", line 2, in <module>
        from util import (
      File "smmap/util.py", line 15, in <module>
        from sys import getrefcount
    ImportError: cannot import name 'getrefcount'```

@Byron
Copy link
Member

Byron commented Mar 12, 2012

As this happens during install, one could possibly just add a quick-fix which catches this import or replaces it by some dummy method. Or one could check the package initialization, and delay importing of symbols even longer.

However, do you think its feasible for you to use easy_install ? I believe its not that sandboxed, so installation should work there.

@vicalejuri
Copy link

Any updates on this?

I'm confused, if i just comment the getrefcount import on the setup, will it still works?

MapRegion (smmap/util.py) seems to natively depend on it (client_count function). Any
other way of achieving the same on pypy ?

Thanks

@alex
Copy link

alex commented Jun 3, 2014

Is there any way I could help out with this? I'd love to be able to use this on PyPy.

msabramo added a commit to msabramo/smmap that referenced this issue Jun 14, 2014
This makes it possibly to at least install on PyPy

Addresses: gitpython-developersGH-4 ("pypy compatibility")
@msabramo
Copy link
Contributor

#9 was merged. This at least makes it possible to install smmap on PyPy. The app that I am using (an internal app that uses GitPython) actually passes all its tests now in PyPy.

Since this is just delaying the import, certain usages will still no doubt fail. Perhaps @alex can suggest an alternative.

@gdude2002
Copy link

This still doesn't build with pip and pypy, as far as I can tell: https://travis-ci.org/UltrosBot/Ultros/jobs/38021528

Any ideas?

EDIT: Our requirements.txt is here: https://github.com/UltrosBot/Ultros/blob/master/requirements.txt

@msabramo
Copy link
Contributor

@gdude2002: Try editing yourrequirements.txt so that it has:

git@github.com:Byron/smmap

That way you get the code in #9. The latest smmap on PyPI, smmap 0.8.2, is from January of 2012, so it wouldn't have this fix.

@Byron Byron added this to the 0.8.3 milestone Nov 13, 2014
@Byron
Copy link
Member

Byron commented Nov 13, 2014

The project was updated on pypi, finally !

@Byron Byron closed this as completed Nov 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants