16 de mayo de 2011

How to install pysvn inside a virtualenv in Mac OS (Snow Leopard)

Using the url to the sources is more portable and works in Mac OS X too.
(pip doesn't find it in PyPi), so I set up the pip requirement with the
path to the .tar.gz with the source:

$ http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.5.tar.gz

If you are using a virtualenv, you'll need to create a symlink. Something like this:

$ ln -s /Library/Python/2.6/site-packages/pysvn/  /lib/python2.6/site-packages/pysvn
Check it worked:

(Env)MacBookPro:viaadmin matias$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
>>> pysvn.version
(1, 7, 5, 1360)

No hay comentarios: