Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.
Ademan edited this page Dec 2, 2010 · 9 revisions

What is this branch?

An experimental branch to modify psycopg2 to work with PyPy.

How should I install it?

Don't! (Yet)

(but if you insist on trying it...)

  1. 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.

  1. 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!

Clone this wiki locally