Pages

Saturday 30 June 2012

svn in virtualenv

I had some issues having svn in my virtual env - because it is created with the --no-site-packages (as it is the default).
What to do?
From the local python, this script will print out the commands for you:
python - << EOF
from os.path import dirname, join
import svn
dist_packages_dir = dirname(dirname(svn.__file__))
print 'cp -r', ' '.join(
  [join(dist_packages_dir, lib) 
    for lib in ['svn', 'libsvn']]),\
  "yourvirtualenvssitepackagesdir"
EOF
And replace yourvirtualenvssitepackagesdir with the site packages dir of your virtualenv

No comments:

Post a Comment