This repository has been archived by the owner on Oct 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ademan edited this page Dec 2, 2010
·
9 revisions
An experimental branch to modify psycopg2 to work with PyPy.
Don't! (Yet)
(but if you insist on trying it...)
- grab my PyPy branch from http://codespeak.net/svn/pypy/branch/psycopg2compatibility and then run:
/path/to/pypy/pypy/module/cpyext/presetup.py setup.py build
from the psycopg2 root directory.
- Then to run pypy with psycopg2, run:
PYTHONPATH=/path/to/psycopg2/build/lib.linux-x86-2.6 /path/to/pypy/pypy/bin/py.py --allworkingmodules
# NOTE: that PYTHONPATH is very inexact
and watch it explode.
I haven't even tried to use psycopg2 with a translated PyPy yet, so don't expect it to work. Also I have not tried to use virtualenv, that's a whole other can of worms... Although I'm basically crudely replicating it...
Currently the most interesting thing you can do is run:
PYTHONPATH=/path/to/psycopg2/build/lib.linux-x86-2.6 /path/to/pypy/pypy/bin/py.py --allworkingmodules runtests.py tests.test_connection
# NOTE: The tests require there be a database named psycopg2_test and that your postgres user has access to it
# (may require superuser actually... that's how I currently have it setup...)
and watch the text scroll by, but some of the tests now pass!