[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: PYTHONPATH in viewcvs with svn

From: Timothee Besset <ttimo_at_idsoftware.com>
Date: 2004-01-26 21:06:52 CET

Same problem here. I just edited the viewcvs source to add the paths.
See patch below. It does both redirect to the correct python version on
the system, and set the correct lib paths ( you may only need the path ).

TTimo

Index: lib/vclib/svn/__init__.py
===================================================================
RCS file: /cvsroot/viewcvs/viewcvs/lib/vclib/svn/__init__.py,v
retrieving revision 1.43
diff -u -r1.43 __init__.py
--- lib/vclib/svn/__init__.py 19 Jan 2004 21:42:33 -0000 1.43
+++ lib/vclib/svn/__init__.py 26 Jan 2004 20:01:23 -0000
@@ -23,6 +23,8 @@
 import string

 # Subversion swig libs
+import sys
+sys.path.append( '/usr/local/lib/svn-python' )
 from svn import fs, repos, core, delta

 # Subversion filesystem paths are '/'-delimited, regardless of OS.
Index: www/cgi/query.cgi
===================================================================
RCS file: /cvsroot/viewcvs/viewcvs/www/cgi/query.cgi,v
retrieving revision 1.4
diff -u -r1.4 query.cgi
--- www/cgi/query.cgi 27 Oct 2003 17:28:30 -0000 1.4
+++ www/cgi/query.cgi 26 Jan 2004 20:01:23 -0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python2.3
 # -*-python-*-
 #
 # Copyright (C) 1999-2002 The ViewCVS Group. All Rights Reserved.
Index: www/cgi/viewcvs.cgi
===================================================================
RCS file: /cvsroot/viewcvs/viewcvs/www/cgi/viewcvs.cgi,v
retrieving revision 1.4
diff -u -r1.4 viewcvs.cgi
--- www/cgi/viewcvs.cgi 18 Sep 2003 22:18:28 -0000 1.4
+++ www/cgi/viewcvs.cgi 26 Jan 2004 20:01:23 -0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python2.3
 # -*-python-*-
 #
 # Copyright (C) 1999-2002 The ViewCVS Group. All Rights Reserved.

Bryan Simmons wrote:

>I noticed that when testing my installation of the
>svn-python swig
>bindings that I couldn't do an "import svn" at first.
>I had to add /usr/local/lib/svn-python to my
>$PYTHONPATH variable. But
>now when I run viewcvs.cgi I'm getting the same
>problem. Whatever
>environment viewcvs runs in is devoid of the knowledge
>of my svn-python
>libs. So I symlinked the folder to /usr/lib/python2.2
>as svn
>-->/usr/local/lib/svn-python. But even that didn't
>fix the problem. My
>last resort here is to hardcode the library path into
>sys.path in the
>actual veiwcvs.cgi script. But that seems a little
>harsh. Is there
>something else about this that maybe I don't know?
>
>
>Regards,
>
>Bryan Simmons
>Network Systems Engineer
>General Physics
>410.379.3710
>bsimmons@genphysics.com
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free web site building tool. Try it!
>http://webhosting.yahoo.com/ps/sb/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jan 26 21:03:38 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.